Skip to content

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.

3 participants