-
Notifications
You must be signed in to change notification settings - Fork 16
Description
When using all lowercase queryid instead of camelCase queryId the X-GraphQL-Keys are not returned in the headers.
If keys are not returned in headers, then the cached document cannot be tagged properly and thus caches cannot be purged properly based on the tags (that were not returned in the headers).
Steps to reproduce
With WPGraphQL and WPGraphQL Smart Cache active, create a new "GraphQL Document"
Copy the ID of the persisted GraphQL Document:
In an incognito window (or using Postman, etc), execute a GET request to your GraphQL endpoint using ?queryId=${yourId}
See the X-GraphQL-Keys in the response:
Now, try again in a new incognito browser tab but using lowercase queryid instead of camelCase queryId and see that the X-GraphQL-Keys are not generated:;
Proposal
Since the query properly executes and returns results for both queryId and queryid we should support the key generation for both query params.



