Skip to content

Commit

Permalink
Merge pull request #1446 from ykuc7/fix-await-request-in-resolved-query
Browse files Browse the repository at this point in the history
fix(graphql): add timeout to _resolveQueryOnNetwork
  • Loading branch information
vincenzopalazzo authored Jul 18, 2024
2 parents 85881df + 9f961e3 commit 0b1b327
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/graphql/lib/src/core/query_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ class QueryManager {

try {
// execute the request through the provided link(s)
response = await link.request(request).first;
response =
await link.request(request).timeout(Duration(seconds: 5)).first;

queryResult = mapFetchResultToQueryResult(
response,
Expand Down

0 comments on commit 0b1b327

Please sign in to comment.