GraphQLDataProvider<T> constructor

GraphQLDataProvider<T>({
  1. required Uri endpoint,
  2. required String queryBuilder(
    1. RouteDataContext context
    ),
  3. required JsonEntityMapper<T> mapper,
  4. Client? client,
  5. Map<String, String> headers = const {},
  6. Duration timeout = const Duration(seconds: 10),
  7. int maxResponseSizeBytes = 5 * 1024 * 1024,
  8. String entityTag = 'graphql_api',
  9. SsrfGuard ssrfGuard = const SsrfGuard(),
})

Implementation

GraphQLDataProvider({
  required this.endpoint,
  required this.queryBuilder,
  required this.mapper,
  http.Client? client,
  this.headers = const {},
  this.timeout = const Duration(seconds: 10),
  this.maxResponseSizeBytes = 5 * 1024 * 1024,
  this.entityTag = 'graphql_api',
  this.ssrfGuard = const SsrfGuard(),
}) : client =
         client ?? ssrfGuard.createPinnedClient(connectionTimeout: timeout);