Skip to content

Commit 0b1b327

Browse files
Merge pull request #1446 from ykuc7/fix-await-request-in-resolved-query
fix(graphql): add timeout to _resolveQueryOnNetwork
2 parents 85881df + 9f961e3 commit 0b1b327

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/graphql/lib/src/core/query_manager.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,8 @@ class QueryManager {
244244

245245
try {
246246
// execute the request through the provided link(s)
247-
response = await link.request(request).first;
247+
response =
248+
await link.request(request).timeout(Duration(seconds: 5)).first;
248249

249250
queryResult = mapFetchResultToQueryResult(
250251
response,

0 commit comments

Comments
 (0)