Skip to content

Commit

Permalink
fix(graphql): add queryRequestTimeout parameter to copyWith method
Browse files Browse the repository at this point in the history
  • Loading branch information
nestorsgarzonc authored and vincenzopalazzo committed Feb 7, 2025
1 parent e9fbc8b commit 2f61d65
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions packages/graphql/lib/src/graphql_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,20 @@ class GraphQLClient implements GraphQLDataProxy {
late final QueryManager queryManager;

/// Create a copy of the client with the provided information.
GraphQLClient copyWith(
{Link? link,
GraphQLCache? cache,
DefaultPolicies? defaultPolicies,
bool? alwaysRebroadcast}) {
GraphQLClient copyWith({
Link? link,
GraphQLCache? cache,
DefaultPolicies? defaultPolicies,
bool? alwaysRebroadcast,
Duration? queryRequestTimeout,
}) {
return GraphQLClient(
link: link ?? this.link,
cache: cache ?? this.cache,
defaultPolicies: defaultPolicies ?? this.defaultPolicies,
alwaysRebroadcast: alwaysRebroadcast ?? queryManager.alwaysRebroadcast);
link: link ?? this.link,
cache: cache ?? this.cache,
defaultPolicies: defaultPolicies ?? this.defaultPolicies,
alwaysRebroadcast: alwaysRebroadcast ?? queryManager.alwaysRebroadcast,
queryRequestTimeout: queryRequestTimeout ?? queryManager.requestTimeout,
);
}

/// This registers a query in the [QueryManager] and returns an [ObservableQuery]
Expand Down

0 comments on commit 2f61d65

Please sign in to comment.