graphql-zeus icon indicating copy to clipboard operation
graphql-zeus copied to clipboard

✨ Expose better errors

Open GauBen opened this issue 2 years ago • 1 comments

GraphQL v16.5.0 has introduced new types that we can leverage to expose better errors.

Features introduced by this PR:

  • [x] Introduced a new class named ZeusError, replacing the confusing GraphQLError
  • [x] Expose errors as an array of GraphQLErrors
  • [x] ZeusError is fully serializable and parse-able (new ZeusError(JSON.parse(JSON.serialize(zeusError))) works great if you don't care about stack-traces)

Breaking changes: none

I also refreshed the examples.

GauBen avatar Jul 12 '22 08:07 GauBen

Thank you so much! Will review later today

aexol avatar Jul 13 '22 10:07 aexol