graphql-hive / graphql-hive/envelop
[useResponseCache] Add the computed `scope` in `buildResponseCacheKey` function params
- Dominant language
- No language data
- Stars
- 827
- Forks
- 132
- PR merge metrics
- No merged PRs in 30d
Description
### The problem
Currently the scope `PUBLIC` creates a cache key per user, since I include the `session` in the key string.
But I'd like to have only ONE key globally shared when it is `PUBLIC`, and a key per session when it is `PRIVATE`.
### A viable solution
To be able to generate a key that is shared across all users, I'd need a property that tells the final computed scope, named `scope` or `isPrivate`.
Maybe I'm missing something, I didn't find any way to reach this goal with the current state of the plugin.
Is it something you considered or conversely that you don't want to include in the `response-cache` ?
To me it appears like a light solution, that could bring more flexibility when building the cache key.
_This update should be reflected in `@graphql-yoga/plugin-response-cache` too_.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.