apollo-ios
apollo-ios copied to clipboard
Include deprecated args and inputFields
Noticed that deprecated args and inputFields were not being generated from introspection.
@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/
Deploy request for apollo-ios-docs pending review.
Visit the deploys page to approve it
| Name | Link |
|---|---|
| Latest commit | 3bad4b26ce6e2b4f33df4a4ada2fcb83fe21d094 |
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.
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
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?
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
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.
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!
Will close this while I work on the solution discussed above.