thunder icon indicating copy to clipboard operation
thunder copied to clipboard

Support GraphQL errors as in GraphQL spec

Open adelcasse opened this issue 6 years ago • 5 comments

Following issue #148, what about something like that that could avoid introducing a breaking change and still handle valid GraphQL errors as in official GraphQL specification ?

I've implemented it on HTTP only for the moment (as a proof of concept) and it could definitely be improved by doing things similar to path errors ...

If it's something interesting for you, I'll pursue on that direction.

adelcasse avatar Aug 21 '18 13:08 adelcasse

Pull Request Test Coverage Report for Build 901

  • 4 of 32 (12.5%) changed or added relevant lines in 2 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.3%) to 63.098%

Changes Missing Coverage Covered Lines Changed/Added Lines %
graphql/http.go 4 18 22.22%
graphql/server.go 0 14 0.0%
<!-- Total: 4 32
Files with Coverage Reduction New Missed Lines %
graphql/schemabuilder/reflect.go 2 71.81%
<!-- Total: 2
Totals Coverage Status
Change from base Build 888: -0.3%
Covered Lines: 3112
Relevant Lines: 4932

💛 - Coveralls

coveralls avatar Aug 21 '18 13:08 coveralls

Setting the location and path shouldn't be the library consumer's responsibility; it should be the library's. Imo there should simply be a flag on the schema that enables spec-compliant errors. And extensions should be facilitated via interface rather than concrete error type.

ccbrown avatar Mar 01 '19 23:03 ccbrown

Is this going anywhwere? Or has an alternative PR been made/merged? This has been open since Aug 2018.

squk avatar Sep 16 '19 20:09 squk

@CodeBrew28 I know this has been inactive for a while, but I'd like to know if you're considering to support errors as in GraphQL spec. Thunder is a great library, but it's a pity to manage errors in the current way.

gobaldia avatar Jun 11 '20 20:06 gobaldia

I don't think they will answer. In https://github.com/samsarahq/thunder/issues/148 they gave a first answer (which pointed me to a private repository I coudn't read) and then, instead of explaining more, deleted this answer and never got back to me. (They could just have said "no we don't want to change that")

adelcasse avatar Jun 15 '20 07:06 adelcasse