Skip to content

Use 'extensions' as field for error details #219

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

Merged
merged 1 commit into from
Aug 13, 2018

Conversation

dvic
Copy link
Contributor

@dvic dvic commented Aug 10, 2018

The June 2018 spec has reserved extensions as the field for error details. This PR updates the serializer to use this name.

From http://facebook.github.io/graphql/June2018/#sec-Errors:

GraphQL may provide an additional entry to errors with key extensions. This entry, if set, must have a map as its value. This entry is reserved for implementors to add additional information to errors however they see fit, and there are no additional restrictions on its contents.

@codecov-io
Copy link

codecov-io commented Aug 10, 2018

Codecov Report

Merging #219 into master will increase coverage by 0.2%.
The diff coverage is 93.33%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #219     +/-   ##
=========================================
+ Coverage   89.76%   89.97%   +0.2%     
=========================================
  Files          96       96             
  Lines       18753    17788    -965     
=========================================
- Hits        16834    16004    -830     
+ Misses       1919     1784    -135
Impacted Files Coverage Δ
juniper/src/lib.rs 84.61% <ø> (+2.79%) ⬆️
juniper/src/integrations/serde.rs 47.5% <100%> (+7.8%) ⬆️
juniper/src/executor/mod.rs 91.52% <85.71%> (-0.17%) ⬇️
juniper_codegen/src/util.rs 77.65% <0%> (-4.54%) ⬇️
juniper/src/util.rs 96.29% <0%> (-3.71%) ⬇️
juniper/src/executor/look_ahead.rs 84.05% <0%> (-3.3%) ⬇️
...lidation/rules/overlapping_fields_can_be_merged.rs 96.55% <0%> (-1.89%) ⬇️
juniper/src/parser/document.rs 96.31% <0%> (-1.5%) ⬇️
juniper/src/value.rs 82.31% <0%> (-1.22%) ⬇️
... and 18 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 56f71e9...e57d202. Read the comment docs.

Copy link
Member

@LegNeato LegNeato left a comment

Choose a reason for hiding this comment

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

Awesome, thanks for the PR! ❤️

Can you add this to the changelog and call out it is a breaking change to better align with the latest spec?

@dvic dvic force-pushed the errors-extensions branch from a3fb2d9 to e57d202 Compare August 13, 2018 10:00
@dvic
Copy link
Contributor Author

dvic commented Aug 13, 2018

@LegNeato done 👍

@LegNeato
Copy link
Member

Awesome, thanks so much! 🍻

@LegNeato LegNeato merged commit ec59766 into graphql-rust:master Aug 13, 2018
@dvic dvic deleted the errors-extensions branch September 2, 2018 09:53
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