absinthe_plug icon indicating copy to clipboard operation
absinthe_plug copied to clipboard

Feat/add spec compliant errors opt

Open thecynicalpaul opened this issue 1 year ago • 5 comments

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 https://github.com/absinthe-graphql/absinthe/pull/1215, this is an optional prop with a default of false until there is a major version release.

Fixes: #284

thecynicalpaul avatar Jul 07 '23 21:07 thecynicalpaul

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 avatar Jul 07 '23 22:07 benwilson512

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?

thecynicalpaul avatar Jul 07 '23 22:07 thecynicalpaul

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

kradydal avatar Nov 22 '23 13:11 kradydal

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.

maartenvanvliet avatar Nov 22 '23 13:11 maartenvanvliet

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?

benwilson512 avatar Jan 26 '24 04:01 benwilson512