copyWith method

WatchQueryOptions<TParsed> copyWith({
  1. DocumentNode? document,
  2. String? operationName,
  3. Map<String, dynamic>? variables,
  4. FetchPolicy? fetchPolicy,
  5. ErrorPolicy? errorPolicy,
  6. CacheRereadPolicy? cacheRereadPolicy,
  7. Object? optimisticResult,
  8. Duration? pollInterval,
  9. bool? fetchResults,
  10. bool? carryForwardDataOnException,
  11. bool? eagerlyFetchResults,
  12. Context? context,
  13. ResultParserFn<TParsed>? parserFn,
  14. Duration? queryRequestTimeout,
})

Generic copyWith for all fields. There are other, more specific options:

Implementation

WatchQueryOptions<TParsed> copyWith({
  DocumentNode? document,
  String? operationName,
  Map<String, dynamic>? variables,
  FetchPolicy? fetchPolicy,
  ErrorPolicy? errorPolicy,
  CacheRereadPolicy? cacheRereadPolicy,
  Object? optimisticResult,
  Duration? pollInterval,
  bool? fetchResults,
  bool? carryForwardDataOnException,
  bool? eagerlyFetchResults,
  Context? context,
  ResultParserFn<TParsed>? parserFn,
  Duration? queryRequestTimeout,
}) =>
    WatchQueryOptions<TParsed>(
      document: document ?? this.document,
      operationName: operationName ?? this.operationName,
      variables: variables ?? this.variables,
      fetchPolicy: fetchPolicy ?? this.fetchPolicy,
      errorPolicy: errorPolicy ?? this.errorPolicy,
      cacheRereadPolicy: cacheRereadPolicy ?? this.cacheRereadPolicy,
      optimisticResult: optimisticResult ?? this.optimisticResult,
      pollInterval: pollInterval ?? this.pollInterval,
      fetchResults: fetchResults ?? this.fetchResults,
      eagerlyFetchResults: eagerlyFetchResults ?? this.eagerlyFetchResults,
      carryForwardDataOnException:
          carryForwardDataOnException ?? this.carryForwardDataOnException,
      context: context ?? this.context,
      parserFn: parserFn ?? this.parserFn,
      queryRequestTimeout: queryRequestTimeout ?? this.queryRequestTimeout,
    );