Skip to content

Implement onError proposal (but with ErrorBehavior rather than __ErrorBehavior) #4384

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

Draft
wants to merge 18 commits into
base: 16.x.x
Choose a base branch
from

Conversation

benjie
Copy link
Member

@benjie benjie commented May 1, 2025

Alternative to:

Using __ErrorBehavior causes older GraphiQL to baulk. I'm hoping that this approach will not.

Copy link

github-actions bot commented May 1, 2025

Hi @benjie, I'm @github-actions bot happy to help you with this PR 👋

Supported commands

Please post this commands in separate comments and only one per comment:

  • @github-actions run-benchmark - Run benchmark comparing base and merge commits for this PR
  • @github-actions publish-pr-on-npm - Build package from this PR and publish it on NPM

@benjie

This comment has been minimized.

Copy link

github-actions bot commented May 1, 2025

@github-actions publish-pr-on-npm

@benjie The latest changes of this PR are available on NPM as
graphql@16.11.0-canary.pr.4384.c095a7b7d5dc33c988f84f0c921ae2f74bb710e6
Note: no gurantees provided so please use your own discretion.

Also you can depend on latest version built from this PR:
npm install --save graphql@canary-pr-4384

@benjie
Copy link
Member Author

benjie commented May 3, 2025

@github-actions publish-pr-on-npm

@@ -37,6 +37,7 @@ describe('Star Wars Introspection Tests', () => {
{ name: 'Droid' },
{ name: 'Query' },
{ name: 'Boolean' },
{ name: 'ErrorBehavior' },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am unsure whether we should expose this as a schema property, this is in fact an internal property that tells us just how a GraphQL API will behave. Most GraphQL code I've seen treats it as such where when walking the introspection there is an explicit check for properties starting with __ to be skipped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants