-
Notifications
You must be signed in to change notification settings - Fork 26
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
Warning: Apollo Server >= 2.4 caches validation result #32
Comments
Verified. Since you can't disable this cache in NB you have to subclass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A feature added to Apollo Server 2.4 (apollographql/apollo-server#2111) introduces a document store that caches successfully parsed and validated documents for future requests (LRU).
This can lead to a case where a query with good variables passes the dynamic validation cost check (see #12) and subsequent requests with the same query but different, larger variables would not trigger the validation rule due to the usage of the cache.
I don't have a sample reproduction repository, but here is an example with
maximumCost: 10
:Schema:
Query:
First request query variables (validation is run) - passes validation:
Second request query variables (validation is skipped) - should fail validation but passes
The text was updated successfully, but these errors were encountered: