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.25k stars 620 forks source link

Throw custom errors from a specific link (ErrorLink) #1172

Open vincenzopalazzo opened 2 years ago

vincenzopalazzo commented 2 years ago

Discussed in https://github.com/zino-hofmann/graphql-flutter/discussions/1080

Originally posted by **raulmabe** March 25, 2022 Hi! :wave: ## Context I created an `ErrorLink` that parsers the errors and throws them. ## Problem The problem comes when the `graphql` client catches these errors and encapsulates them to always return a `QueryResult`. I would expect that the errors thrown by the `ErrorLink` could propagate (by throwing them) till my domain layer. Would be possible to do this?