copyWithOptions method
QueryOptions<TParsed>
copyWithOptions({
- DocumentNode? document,
- String? operationName,
- Map<
String, dynamic> ? variables, - FetchPolicy? fetchPolicy,
- ErrorPolicy? errorPolicy,
- CacheRereadPolicy? cacheRereadPolicy,
- Object? optimisticResult,
- Duration? pollInterval,
- Context? context,
- ResultParserFn<
TParsed> ? parserFn, - Duration? queryRequestTimeout,
- OnQueryComplete? onComplete,
- OnQueryError? onError,
Generic copyWith for all fields. There are other, more specific options:
Implementation
QueryOptions<TParsed> copyWithOptions({
DocumentNode? document,
String? operationName,
Map<String, dynamic>? variables,
FetchPolicy? fetchPolicy,
ErrorPolicy? errorPolicy,
CacheRereadPolicy? cacheRereadPolicy,
Object? optimisticResult,
Duration? pollInterval,
Context? context,
ResultParserFn<TParsed>? parserFn,
Duration? queryRequestTimeout,
OnQueryComplete? onComplete,
OnQueryError? onError,
}) =>
QueryOptions<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,
context: context ?? this.context,
parserFn: parserFn ?? this.parserFn,
queryRequestTimeout: queryRequestTimeout ?? this.queryRequestTimeout,
onComplete: onComplete ?? this.onComplete,
onError: onError ?? this.onError,
);