apollo-ios icon indicating copy to clipboard operation
apollo-ios copied to clipboard

Include deprecated args and inputFields

Open dave-perry opened this issue 3 years ago • 8 comments
trafficstars

Noticed that deprecated args and inputFields were not being generated from introspection.

dave-perry avatar Jul 25 '22 11:07 dave-perry

@dave-perry: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

apollo-cla avatar Jul 25 '22 11:07 apollo-cla

Deploy request for apollo-ios-docs pending review.

Visit the deploys page to approve it

Name Link
Latest commit 3bad4b26ce6e2b4f33df4a4ada2fcb83fe21d094

netlify[bot] avatar Jul 25 '22 11:07 netlify[bot]

Hi @dave-perry - thanks for the contribution. I can't seem to find anything in the GraphQL spec re. Schema Introspection that says these arguments are supported. Can you please direct me to documentation supporting the availability of them - thanks.

calvincestari avatar Jul 25 '22 14:07 calvincestari

Hi @dave-perry - thanks for the contribution. I can't seem to find anything in the GraphQL spec re. Schema Introspection that says these arguments are supported. Can you please direct me to documentation supporting the availability of them - thanks.

Hey @calvincestari no worries, looks like the documentation for this is still in draft: https://spec.graphql.org/draft/#sec-Schema-Introspection.Schema-Introspection-Schema

dave-perry avatar Jul 25 '22 14:07 dave-perry

Thanks @dave-perry! I don't think we can pull those changes into the standard introspection query that all schema downloads would use given that it's currently a draft spec; it's the reason for the failing integration test on this PR. Admittedly we use an old version of Apollo Server in our CI services but I still don't think we could make it the default introspection query. The parameters on fields and enumValues are supported all the way back to the October 2015 spec as an example.

I'll see what else we could do to support this newer introspection query. Does your server implementation support it at the moment?

calvincestari avatar Jul 26 '22 10:07 calvincestari

Our server implementation does, yes.

I could look to make it optionally included, similar to graphql-js? https://github.com/graphql/graphql-js/blob/main/src/utilities/getIntrospectionQuery.ts#L81

dave-perry avatar Jul 26 '22 10:07 dave-perry

If you're happy to and have the time to keep iterating on a solution, I'll keep working with you on it for sure.

calvincestari avatar Jul 26 '22 11:07 calvincestari

I'd be happy to have this as an optional feature. We have plenty of configuration options in ApolloCodgenOptions, so the schema downloader can do the same thing. We just need to make sure to document carefully that your server must support this or it's going to get an error. Would love to see this added to the 1.0 implementation of SchemaDownloader as well in the release/1.0 branch.

Thanks for getting involved @dave-perry!

AnthonyMDev avatar Jul 27 '22 17:07 AnthonyMDev

Will close this while I work on the solution discussed above.

dave-perry avatar Aug 25 '22 15:08 dave-perry