-
Notifications
You must be signed in to change notification settings - Fork 2k
Implement onError proposal #4364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 16.x.x
Are you sure you want to change the base?
Conversation
Hi @benjie, I'm @github-actions bot happy to help you with this PR 👋 Supported commandsPlease post this commands in separate comments and only one per comment:
|
This comment has been minimized.
This comment has been minimized.
@benjie The latest changes of this PR are available on NPM as Also you can depend on latest version built from this PR: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not opposed to this but what are we doing with the directive that is present on main
/v17?
* | ||
* @experimental | ||
*/ | ||
onError?: GraphQLErrorBehavior; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we move this to the new options?:
object that is in here, could maybe facilitate these experimental things better. Alternatively we stick to a flat config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's specified to be part of the "GraphQL request", so I would expect it top level. I would consider moving some of the non-request properties to be inside an options object though: fieldResolver, typeResolver, subscribeFieldResolver.
I want to add an introspection field indicating the default error behavior of a schema, so I've moved this to draft. |
Spec PR: graphql/graphql-spec#1153