Skip to content

Commit 2f61d65

Browse files
nestorsgarzoncvincenzopalazzo
authored andcommitted
fix(graphql): add queryRequestTimeout parameter to copyWith method
1 parent e9fbc8b commit 2f61d65

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

packages/graphql/lib/src/graphql_client.dart

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,20 @@ class GraphQLClient implements GraphQLDataProxy {
5151
late final QueryManager queryManager;
5252

5353
/// Create a copy of the client with the provided information.
54-
GraphQLClient copyWith(
55-
{Link? link,
56-
GraphQLCache? cache,
57-
DefaultPolicies? defaultPolicies,
58-
bool? alwaysRebroadcast}) {
54+
GraphQLClient copyWith({
55+
Link? link,
56+
GraphQLCache? cache,
57+
DefaultPolicies? defaultPolicies,
58+
bool? alwaysRebroadcast,
59+
Duration? queryRequestTimeout,
60+
}) {
5961
return GraphQLClient(
60-
link: link ?? this.link,
61-
cache: cache ?? this.cache,
62-
defaultPolicies: defaultPolicies ?? this.defaultPolicies,
63-
alwaysRebroadcast: alwaysRebroadcast ?? queryManager.alwaysRebroadcast);
62+
link: link ?? this.link,
63+
cache: cache ?? this.cache,
64+
defaultPolicies: defaultPolicies ?? this.defaultPolicies,
65+
alwaysRebroadcast: alwaysRebroadcast ?? queryManager.alwaysRebroadcast,
66+
queryRequestTimeout: queryRequestTimeout ?? queryManager.requestTimeout,
67+
);
6468
}
6569

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

0 commit comments

Comments
 (0)