Add query param to remove deprecated GraphQL schema items
What does this MR do and why?
Allows to pass the remove_deprecated=true
query parameter to GraphQL API requests to remove all deprecated schema items for the respective request.
This can be useful to check existing GraphQL calls against the schema without any deprecated fields.
Screenshots or screen recordings
N/A
How to set up and validate locally
- Create a GraphQL query with some deprecated fields, arguments or enum values, e.g.
{ users(first: 5) { edges { node { id email publicEmail } } } }
email
is a deprecated field here - Run this query against the GraphQL API:
POST http://localhost:3000/api/graphql
-> Should work without issues - Run this query again using the
remove_depreacted=true
query parameter:POST http://localhost:3000/api/graphql?remove_deprecated=true
-> Should fail becauseemail
is no longer an existing field
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #353642 (closed)