-
Notifications
You must be signed in to change notification settings - Fork 5
Aggregate errors in results instead of throwing them #13
Comments
Hmm, I think we need to distinguish here between errors that a user needs to handle and errors that are viable to work with. I would think that making everything a graphql type error would not leverage the paradigms rxjs helps us with. Throw Observable
error block on result
What do you think about this approach? |
Your suggestions:
100% agree with 4 and 5, and they are the most important! I think in 4, we also consider resolvers that return an Observable that end up throwing, right? The rest being more anecdotic and/or not clearly specified, so I don't have hard thoughts. For 1, as discussed, for the reference, the specification is not clear and in the reference implementation, they decided to add any SyntaxError to the list of errors and to resolve normally the result with the |
Now we do 👍 I think this interface will have a nice usability, let's see when I have time to implement it, but it's my top priority on this project. |
Reactive-GraphQL is currently throwing an error, completing the observable In the future (d2iq-archive/reactive-graphql#13) we would want to aggregate these non-structural errors in the output instead, this is why I choose to deferr this test a little.
Reactive-GraphQL is currently throwing an error, completing the observable In the future (d2iq-archive/reactive-graphql#13) we would want to aggregate these non-structural errors in the output instead, this is why I choose to deferr this test a little.
Reactive-GraphQL is currently throwing an error, completing the observable In the future (d2iq-archive/reactive-graphql#13) we would want to aggregate these non-structural errors in the output instead, this is why I choose to deferr this test a little.
According to GrapqhQL specification, any error (missing field, resolver raises..) should be caught, formatted (
GraphQLError
type ingraphql-js
) and added to the "errors" list in the response.As of today, they are thrown in the observable error channel.
The text was updated successfully, but these errors were encountered: