GraphQLClient constructor

GraphQLClient({
  1. required Link link,
  2. required GraphQLCache cache,
  3. DefaultPolicies? defaultPolicies,
  4. bool alwaysRebroadcast = false,
  5. DeepEqualsFn? deepEquals,
  6. bool deduplicatePollers = false,
  7. Duration queryRequestTimeout = const Duration(seconds: 5),
})

Constructs a GraphQLClient given a Link and a Cache.

Implementation

GraphQLClient({
  required this.link,
  required this.cache,
  DefaultPolicies? defaultPolicies,
  bool alwaysRebroadcast = false,
  DeepEqualsFn? deepEquals,
  bool deduplicatePollers = false,
  Duration queryRequestTimeout = const Duration(seconds: 5),
})  : defaultPolicies = defaultPolicies ?? DefaultPolicies(),
      queryManager = QueryManager(
        link: link,
        cache: cache,
        alwaysRebroadcast: alwaysRebroadcast,
        deepEquals: deepEquals,
        deduplicatePollers: deduplicatePollers,
        requestTimeout: queryRequestTimeout,
      );