Skip to content
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

feat(response-cache): added getScope callback in buildResponseCacheKey #2202

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Dunk14
Copy link

@Dunk14 Dunk14 commented Apr 2, 2024

Issue related : #2181

Description

Include a getScope callback in buildResponseCacheKey to enable an Apollo like behavior, where PUBLIC scopes have only one cache key to get better performances on larger scales.

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

I added some unit tests to check that PRIVATE scope is correctly retrieved from a query, when directive @cacheControl(scope: PRIVATE) is put on query, field and subfield.

Checklist:

  • I have followed the
    CONTRIBUTING doc and the
    style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented on my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Copy link

changeset-bot bot commented Apr 2, 2024

🦋 Changeset detected

Latest commit: 9e8ea70

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@envelop/response-cache Minor
@envelop/response-cache-cloudflare-kv Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Dunk14 Dunk14 force-pushed the feat/response-cache-query-scope branch 6 times, most recently from 4f30aba to a5468bb Compare April 3, 2024 16:50
@Dunk14 Dunk14 force-pushed the feat/response-cache-query-scope branch from a5468bb to 9e8ea70 Compare April 17, 2024 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant