diff --git a/packages/graphql/lib/src/graphql_client.dart b/packages/graphql/lib/src/graphql_client.dart index 6d7a1edf..a8addbe4 100644 --- a/packages/graphql/lib/src/graphql_client.dart +++ b/packages/graphql/lib/src/graphql_client.dart @@ -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]