-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Be strict about error paths format #1073
Conversation
✅ Deploy Preview for graphql-spec-draft ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
This is technically a breaking change; but it seems more of a bugfix to me - this should (haha) have been a must
all along, and I'm not aware of any implementation that is breaking these rules. I'm not going to mark this as an approval until we've discussed at the WG, but I am heavily in favour of it.
@leebyron Was this deliberately a should
, or was it a case where natural language accidentally made its way in rather than RFC2119 language?
@martinbonnin Please add this to an upcoming WG for discussion.
cc @graphql/implementers - is anyone's implementation going to break if we change this from should
to must
?
With @martinbonnin 's permission, I've added back the discussion about graphql/graphql-spec#1073 to the agenda
cc @mjmahone in case you have context on why this is not "must". You mentioned that this might have been an intentional choice to allow servers to use errors to silently handle things like permissions? I can see a parallel here with things like returning 404 errors when you try to access a route that you don't have permission to view in order to prevent you from using the status code to determine if a private entity exists or not. |
@captbaritone I was misunderstanding the context. I don't have an objection to the |
@graphql/implementers - please review before we accept |
Radiating intent here (and action item): We intend to accept this and merge it next month barring any feedback. |
Co-authored-by: Benjie <[email protected]>
From a GraphQL Java POV we are ok with that |
At the Mar 7 WG meeting we established that we intend to merge this PR after the April WG meeting, unless there are objections. If you implement a GraphQL server or client and do not implement the error paths array as specified, please let us know! |
Replace
should
withmust
in the description of error paths:This field must be a list of path segments starting...
Anything else will make it impossible to handle errors in error-aware clients. This is especially important for strict-nullability or semantic-non-nullability