-
Notifications
You must be signed in to change notification settings - Fork 662
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
SchemaDownlader: Update to download deprecated input fields #4678
Conversation
Added `(includeDeprecated: true)` as a params to `inputFields` in the `fragment` portion of the GraphQL query to download a schema. ### Current Behavior When the `downloadApolloSchema` Gradle task is run, input fields with the `@deprecated` tag **ARE NOT** downloaded. ### Expected Change in Behavior When the `downloadApolloSchema` Gradle task is run, input fields with the `@deprecated` tag **ARE** downloaded.
@ndwhelan: 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-android-docs pending review.Visit the deploys page to approve it
|
@@ -199,7 +199,7 @@ object SchemaDownloader { | |||
isDeprecated | |||
deprecationReason | |||
} | |||
inputFields { | |||
inputFields(includeDeprecated: true { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you're missing a closing parenthesis here
libraries/apollo-tooling/src/main/kotlin/com/apollographql/apollo3/tooling/SchemaDownloader.kt
Show resolved
Hide resolved
Wow, that is embarrassing. Sorry for that. I need to actually pull the code
and do this properly instead of just using the GitHuh editor. Thank you for
the advice.
…On Fri, Feb 10, 2023, 5:55 AM Martin Bonnin ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In
libraries/apollo-tooling/src/main/kotlin/com/apollographql/apollo3/tooling/SchemaDownloader.kt
<#4678 (comment)>
:
> @@ -199,7 +199,7 @@ object SchemaDownloader {
isDeprecated
deprecationReason
}
- inputFields {
+ inputFields(includeDeprecated: true {
...InputValue
You'll also want to update the InputValue fragment to include isDeprecated
and deprecationReason
—
Reply to this email directly, view it on GitHub
<#4678 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHINQ6XJQTL5CKVWYVPGYLWWYUEHANCNFSM6AAAAAAUXDNG2Q>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi @ndwhelan how can we help here? Want us to get this through the finish line? |
Apologies. Numerous high priority things came up for me this week. I'd like
to try to finish it this weekend.
If you think it's preferable that you take it on at this point, though, I
certainly would not have any problem with that.
Best,
Nick
…On Fri, Feb 17, 2023, 3:45 AM Martin Bonnin ***@***.***> wrote:
Hi @ndwhelan <https://github.com/ndwhelan> how can we help here? Want us
to get this through the finish line?
—
Reply to this email directly, view it on GitHub
<#4678 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHINQ275SJ2W4EFIGQNWN3WX5CCDANCNFSM6AAAAAAUXDNG2Q>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
No worries at all! Take your time, just wanted to make sure this doesn't fall through the cracks. |
Fixed a missing parenthesis caught in the PR, and also request the new fields with information in deprecation into the `InputType` fragment. Updated `DownloadSchemaTests` to have a schema with deprecated fields, to validate that deprecated fields and their deprecation reason are now returned by the query in `SchemaDownloader`.
I've updated things from the PR, and updated a test. The tests are passing, but I wasn't really convinced it wouldn't return the whole thing regardless of my query in SchemaDownloader. I want to say it was, because it would fail if I put bad syntax in, but I'm not 100% sure. Any feedback on the test or improving that would be appreciated. I should be able to resolve it promptly if necessary. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks very good to me, Thanks! 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Co-authored-by: Nick Whelan <[email protected]> (cherry picked from commit 7cfc0c3)
This has been released as part of v3.7.5 |
Added
(includeDeprecated: true)
as a params toinputFields
in thefragment
portion of the GraphQL query to download a schema.Current Behavior
When the
downloadApolloSchema
Gradle task is run, input fields with the@deprecated
tag ARE NOT downloaded.Expected Change in Behavior
When the
downloadApolloSchema
Gradle task is run, input fields with the@deprecated
tag ARE downloaded.