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

Unable to get deprecated input object fields via introspection query #1113

Closed
jerelmiller opened this issue Oct 20, 2021 · 4 comments
Closed

Comments

@jerelmiller
Copy link
Contributor

jerelmiller commented Oct 20, 2021

Environment

  • Elixir version (elixir -v): 1.12.3
  • Absinthe version (mix deps | grep absinthe): 1.6.4
  • Client Framework and version (Relay, Apollo, etc): Apollo

Expected behavior

When making an introspection query to get data about fields, I'd like to query for deprecated fields on input objects. While I am able to use the deprecate/1 macro and the deprecate option on field/3 inside an input_object, I am unable to query for it in the introspection query.

I can use the built-in introspection query to get the data from the schema, but when I try and request isDeprecated on __InputValue or include the includeDeprecated arg to inputFields, I get an error since the field doesn't exist.

Diving into the code, I do see that isDeprecated is not included in the __inputvalue type.

I'd love to deprecate arguments to a GraphQL service I have in place, but am unable to do so.

For what its worth, it does look like this is supported in graphql.js

Actual behavior

Unable to get deprecation information on input object fields

@maartenvanvliet
Copy link
Contributor

Deprecation of input values has not officially moved into the graphql spec yet, see: graphql/graphql-spec#805

I think the graphql.js library does have support since it's a testbed for the development of the graphql spec.

@jerelmiller
Copy link
Contributor Author

How interesting! I didn't realize this was still just a proposal and not actually part of the spec. Thanks for pointing me in that direction!

@yleflour
Copy link

@maartenvanvliet, it seems the spec was merged on June 3rd 2022.

Might consider reopening this issue

@bjunc
Copy link

bjunc commented Jan 12, 2023

Looks like this was merged into the spec back in 08/22.
dchang-dchang/graphql@9ef8c9b

It'd be great if Absinthe could support this, although using the description has worked as a stop-gap.

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

No branches or pull requests

5 participants