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

Feat/add spec compliant errors opt #285

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

thecynicalpaul
Copy link

As per the spec (https://spec.graphql.org/October2021/#sec-Errors.Error-result-format) enables placing extra errors in the extensions field using spec_compliant_errors: bool plug option.

In line with absinthe-graphql/absinthe#1215, this is an optional prop with a default of false until there is a major version release.

Fixes: #284

@benwilson512
Copy link
Contributor

Hey @thecynicalpaul I think this is a good contribution, but I am wondering if there is a more generic way to handle this so that it doesn't need to be managed this way with a custom pipeline. This limits the ease of use of this feature.

@thecynicalpaul
Copy link
Author

Hey @thecynicalpaul I think this is a good contribution, but I am wondering if there is a more generic way to handle this so that it doesn't need to be managed this way with a custom pipeline. This limits the ease of use of this feature.

@benwilson512 Thanks! I am not 100% sure. I think it really depends on what is going to happen to Absinthe core. Right now, the spec_compliant_errors option is only supplied to the result phase. There isn't a simple way to use this for the end-user at the moment. Do you have any thoughts?

@kradydal
Copy link

Are you planning to merge it? It would be great to have this option in the absinthe_plug 🙏

@maartenvanvliet
Copy link
Contributor

A PR to the absinthe core document pipeline where the options are passed through is first needed. Then the option can be added to absinthe_plug as well.

@benwilson512
Copy link
Contributor

Hey folks! I'm trying to follow up on the status of some of these PRs. Did the PR mentioned by @maartenvanvliet get submitted and merged?

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.

Support spec_compliant_errors in Plug options
4 participants