When a GraphQL Query is cached, the key is generated from information such as:
normalized query string
user executing the query
variables
It would be good to be able to filter the cache key to support additional fields, such as extensions, that can be included in GraphQL requests.
One use case I've thought about, is internationalization.
if I were to pass an extension, such as (not currently implemented):
"extensions": {
"locale": "ES_MX"
}
I would like my query to execute with Spanish - Mexico translations.
It would be good to allow plugin authors (WPGraphQL for Polylang, possibly, in this case) to be able to filter the cache key to account for these other inputs.
When a GraphQL Query is cached, the key is generated from information such as:
It would be good to be able to filter the cache key to support additional fields, such as extensions, that can be included in GraphQL requests.
One use case I've thought about, is internationalization.
I would like my query to execute with Spanish - Mexico translations.
It would be good to allow plugin authors (WPGraphQL for Polylang, possibly, in this case) to be able to filter the cache key to account for these other inputs.