machinebox / graphql

Simple low-level GraphQL HTTP client for Go
https://blog.machinebox.io/a-graphql-client-library-for-go-5bffd0455878
Apache License 2.0
933 stars 217 forks source link

expose GraphQLError error field #74

Closed jipperinbham closed 2 years ago

jipperinbham commented 2 years ago

Currently, it's not possible to create an instance of GraphQLError in a dependent package for testing such that it can utilize the helper functions (i.e. IsUnauthorizedError) because the error field is not accessible. With this change, packages that depend on this module can create an instance of GraphQLError to be able to assert specific error conditions.