zino-hofmann / graphql-flutter

A GraphQL client for Flutter, bringing all the features from a modern GraphQL client to one easy to use package.
https://zino-hofmann.github.io/graphql-flutter
MIT License
3.24k stars 612 forks source link

How to get status code in GraphQL? #1311

Closed rrifafauzikomara closed 1 year ago

rrifafauzikomara commented 1 year ago
final client = GraphQLClient(...);
final result = await client.query(...);
if (result.hasException) {
  // how to get status code when error
} else {
  // how to get status code when success 
}

Any idea or example?