You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firstly, thank you for this awesome project. I'm using it very successfully to detect usage of @deprecated fields, queries and mutations in any incoming requests, so I can better understand which clients are sending older requests to my server.
As I'm using Apollo Server, I have created an Apollo plugin to perform this:
As mentioned, this works perfectly for any deprecated query, mutation or field. However, I cannot figure out how to detect any deprecated mutation inputs.
For this second case, as the operation AST does not directly include the query variables, I can understand why this would not be detected. In the Apollo plugin, didResolveOperation includes a request.variables object, which contains the variable values, but I can't figure out how to use this with the operation to pass to validate.
If anyone can help or offer guidance, it would be much appreciated!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Firstly, thank you for this awesome project. I'm using it very successfully to detect usage of
@deprecated
fields, queries and mutations in any incoming requests, so I can better understand which clients are sending older requests to my server.As I'm using Apollo Server, I have created an Apollo plugin to perform this:
As mentioned, this works perfectly for any deprecated query, mutation or field. However, I cannot figure out how to detect any deprecated mutation inputs.
By way of example, take the following schema:
If I send the following query, the deprecated
name
field is not detected:If variables are used instead, my code also doesn't detect this:
For this second case, as the
operation
AST does not directly include the query variables, I can understand why this would not be detected. In the Apollo plugin,didResolveOperation
includes arequest.variables
object, which contains the variable values, but I can't figure out how to use this with theoperation
to pass tovalidate
.If anyone can help or offer guidance, it would be much appreciated!
Beta Was this translation helpful? Give feedback.
All reactions