Skip to content
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

Add optional 'extensions' entry to errors #407

Merged
merged 5 commits into from
Mar 6, 2018

Conversation

IvanGoncharov
Copy link
Member

@IvanGoncharov IvanGoncharov commented Feb 9, 2018

As discussed on the last WG meetup it makes sense to define some common error properties like: code, category, etc. I think such initiative should be lead by public API owners and required broader discussion.

However, I think we could make this process more painless by proactively preventing possible name clashes.
For example, if a future version of spec will defines code as a string it can break some public API that use integers for error codes.

Another alternative would be to recommend prefixing additional fields with x- (e.g. x-code) but I think it's better to reuse extensions from response object.

@leebyron leebyron merged commit 54df48d into graphql:master Mar 6, 2018
@leebyron
Copy link
Collaborator

leebyron commented Mar 6, 2018

Made some edits, but this is definitely a straight forward improvement. Thanks for drafting this after the WG meeting!

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.

None yet

3 participants