-
Notifications
You must be signed in to change notification settings - Fork 169
feat: Adding deprecation fields to InputValue #553
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
Conversation
This will support deprecated directive on InputValue as defined in https://spec.graphql.org/September2025/#sec--deprecated
tomhoule
left a comment
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.
Nice, thanks for the PR!
tomhoule
left a comment
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.
Ah, both fields need a #[serde(default)] attribute, otherwise they will be expected, and it won't work with older introspection responses.
New fields should have default serde values in order to keep backward compatibility.
Done |
tomhoule
left a comment
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.
Thanks for the contribution!
<!--
First, 🌠 thank you 🌠 for taking the time to consider a contribution to
Apollo!
Here are some important details to follow:
* ⏰ Your time is important
To save your precious time, if the contribution you are making will
take more than an hour, please make sure it has been discussed in an
issue first. This is especially true for feature requests!
* 💡 Features
Feature requests can be created and discussed within a GitHub Issue.
Be sure to search for existing feature requests (and related issues!)
prior to opening a new request. If an existing issue covers the need,
please upvote that issue by using the 👍 emote, rather than opening a
new issue.
* 🕷 Bug fixes
These can be created and discussed in this repository. When fixing a
bug,
please _try_ to add a test which verifies the fix. If you cannot, you
should
still submit the PR but we may still ask you (and help you!) to create a
test.
* 📖 Contribution guidelines
Follow https://github.com/apollographql/rover/blob/HEAD/CONTRIBUTING.md
when submitting a pull request. Make sure existing tests still pass, and
add
tests for all new behavior.
* ✏️ Explain your pull request
Describe the big picture of your changes here to communicate to what
your pull request is meant to accomplish. Provide 🔗 links 🔗 to
associated issues!
We hope you will find this to be a positive experience! Open source
contribution can be intimidating and we hope to alleviate that pain as
much
as possible. Without following these guidelines, you may be missing
context
that can help you succeed with your contribution, which is why we
encourage
discussion first. Ultimately, there is no guarantee that we will be able
to
merge your pull-request, but by following these guidelines we can try to
avoid disappointment.
-->
Fixing an issue where the rover will remove deprecated input fields when
using the `rover graph introspect` command.
It requires the following proposed changes to `graphql-client` crate
graphql-rust/graphql-client#553.
|
@tomhoule are you planning to release a new version anytime soon? |
…2855) <!-- First, 🌠 thank you 🌠 for taking the time to consider a contribution to Apollo! Here are some important details to follow: * ⏰ Your time is important To save your precious time, if the contribution you are making will take more than an hour, please make sure it has been discussed in an issue first. This is especially true for feature requests! * 💡 Features Feature requests can be created and discussed within a GitHub Issue. Be sure to search for existing feature requests (and related issues!) prior to opening a new request. If an existing issue covers the need, please upvote that issue by using the 👍 emote, rather than opening a new issue. * 🕷 Bug fixes These can be created and discussed in this repository. When fixing a bug, please _try_ to add a test which verifies the fix. If you cannot, you should still submit the PR but we may still ask you (and help you!) to create a test. * 📖 Contribution guidelines Follow https://github.com/apollographql/rover/blob/HEAD/CONTRIBUTING.md when submitting a pull request. Make sure existing tests still pass, and add tests for all new behavior. * ✏️ Explain your pull request Describe the big picture of your changes here to communicate to what your pull request is meant to accomplish. Provide 🔗 links 🔗 to associated issues! We hope you will find this to be a positive experience! Open source contribution can be intimidating and we hope to alleviate that pain as much as possible. Without following these guidelines, you may be missing context that can help you succeed with your contribution, which is why we encourage discussion first. Ultimately, there is no guarantee that we will be able to merge your pull-request, but by following these guidelines we can try to avoid disappointment. --> Fixing an issue where the rover will remove deprecated input fields when using the `rover graph introspect` command. It requires the following proposed changes to `graphql-client` crate graphql-rust/graphql-client#553. Co-authored-by: @lpessoa Co-authored-by: Luis Filipe Pessoa <luisalmeida@yape.com.pe>
…2855) <!-- First, 🌠 thank you 🌠 for taking the time to consider a contribution to Apollo! Here are some important details to follow: * ⏰ Your time is important To save your precious time, if the contribution you are making will take more than an hour, please make sure it has been discussed in an issue first. This is especially true for feature requests! * 💡 Features Feature requests can be created and discussed within a GitHub Issue. Be sure to search for existing feature requests (and related issues!) prior to opening a new request. If an existing issue covers the need, please upvote that issue by using the 👍 emote, rather than opening a new issue. * 🕷 Bug fixes These can be created and discussed in this repository. When fixing a bug, please _try_ to add a test which verifies the fix. If you cannot, you should still submit the PR but we may still ask you (and help you!) to create a test. * 📖 Contribution guidelines Follow https://github.com/apollographql/rover/blob/HEAD/CONTRIBUTING.md when submitting a pull request. Make sure existing tests still pass, and add tests for all new behavior. * ✏️ Explain your pull request Describe the big picture of your changes here to communicate to what your pull request is meant to accomplish. Provide 🔗 links 🔗 to associated issues! We hope you will find this to be a positive experience! Open source contribution can be intimidating and we hope to alleviate that pain as much as possible. Without following these guidelines, you may be missing context that can help you succeed with your contribution, which is why we encourage discussion first. Ultimately, there is no guarantee that we will be able to merge your pull-request, but by following these guidelines we can try to avoid disappointment. --> Fixing an issue where the rover will remove deprecated input fields when using the `rover graph introspect` command. It requires the following proposed changes to `graphql-client` crate graphql-rust/graphql-client#553. Co-authored-by: @lpessoa Co-authored-by: Luis Filipe Pessoa <luisalmeida@yape.com.pe>
|
There are other maintainers with publish rights. I'd need to write a changelog, etc. I don't have spare time for this crate at the moment, but I will absolutely release next time I have time for unpaid work. |
Adding support to deprecated directive on
InputValueas defined in https://spec.graphql.org/September2025/#sec--deprecated.This will also help us to solve a bug on http://github.com/apollographql/rover where the rover graph introspection does not correctly fetch the
@deprecateddirectives from the introspected schema.