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

Return GraphQL compliant errors #3728

Merged
merged 1 commit into from
Aug 6, 2019
Merged

Return GraphQL compliant errors #3728

merged 1 commit into from
Aug 6, 2019

Conversation

MichaelJCompton
Copy link
Contributor

@MichaelJCompton MichaelJCompton commented Jul 29, 2019

Add GraphQL spec compliant errors to x package. That means alpha http endpoint should return GraphQL compliant errors.

Change from current structure is where code sits. With this PR it moves to extensions. Should we call this breaking and move into 1.1 release?

This changes means Alpha and GraphQL layer can use the same sorts of errors and responses and moves Dgraph closer to GraphQL compliant.

Maybe we should consider using GQL Locations structure for reporting locations of Dgraph query parsing errors as well?

This change is Reviewable

@MichaelJCompton MichaelJCompton requested review from manishrjain and a team as code owners July 29, 2019 12:29
Copy link
Contributor

@pawanrawal pawanrawal left a comment

Choose a reason for hiding this comment

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

LGTM

Regarding the 1.1 release, my understanding is that master would be released as 1.1 at some point. I'll have to confirm with @danielmai about that. Semver says that breaking API changes require a major update but I guess we are far from v2.0.

Would be nice to populate locations as well. Looks like its mandatory as well. Do we have that information yet?

@MichaelJCompton
Copy link
Contributor Author

Doesn't semver say that breaking changes go into minor releases, so from 1.0.16->1.1.0 is the right spot? i.e. just not in patch releases.

I think there's been some changes to Dgraph query parsing to report error locations. Would make for nicer error messages to have that info.

@MichaelJCompton
Copy link
Contributor Author

P.S. GraphQL layer has the locations info and already reports that - e.g. on type errors or parse errors etc.

It does it atm using a different struct, will be using this, once this merges.

Copy link
Contributor

@manishrjain manishrjain left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@MichaelJCompton MichaelJCompton merged commit efb9387 into master Aug 6, 2019
@MichaelJCompton MichaelJCompton deleted the mjc/gql-errs branch August 6, 2019 23:51
MichaelJCompton added a commit that referenced this pull request Aug 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants