Connection closed before full header was recieved error in graphql_flutter

59 Views Asked by At

I'm encountering an intermittent issue while fetching data from a GraphQL endpoint using the graphql_flutter package in my Flutter app. Occasionally, I receive the error message "Connection closed before full header was received", while at other times, the requests succeed without any problems.

Here are the logs for more context:

flutter: OperationException(linkException: ServerException(originalException: Connection closed before full header was received, originalStackTrace: #0      IOClient.send (package:http/src/io_client.dart:96:7)
<asynchronous suspension>
#1      HttpLink._executeRequest (package:gql_http_link/src/link.dart:131:24)
<asynchronous suspension>
#2      HttpLink.request (package:gql_http_link/src/link.dart:76:26)
<asynchronous suspension>
#3      _StreamController._add (dart:async/stream_controller.dart:656:3)
<asynchronous suspension>
, parsedResponse: null), graphqlErrors: [])

This error does not occur consistently but appears from time to time.

0

There are 0 best solutions below