NavidK0 / SimpleGraphQL-For-Unity

A simple graphQL client that allows one to use .graphql files (or code) for queries, mutations, and subscriptions with Unity.
MIT License
34 stars 18 forks source link

feat!: Throw exceptions when HTTP requests fail #19

Closed johanhelsing closed 3 years ago

johanhelsing commented 3 years ago

Needed in order to handle different kind of failures appropriately. For instance when implementing a login flow.

BREAKING CHANGE: This means that some queries that previously returned a Response<T> object with errors in it now throw UnityWebRequestException instead.

I copied the UnityWebRequestException class from Cysharp.UniTask.

See the tests for how this affects existing error handling.

Fixes #18