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

Follow-up to #6655 #6664

Merged
merged 1 commit into from
Jul 11, 2022

Conversation

glasser
Copy link
Member

@glasser glasser commented Jul 11, 2022

  • Rename BaseCacheKey and ContextualCacheKey with "Data" on end, since
    the cache key is a string.
  • Reintroduce CacheKey(Data) removed in ✨ Adding generateCacheKey to ApolloServerPluginResponseCache to allow for custom cache keys #6655; make the
    GenerateCacheKeyFunction type be defined in terms of it. Now calls to
    the const generateCacheKey function are type-safe (ie, the second
    arg is a CacheKeyData rather than unknown).
  • Describe generateCacheKey hook as a method rather than a field, like
    the other hooks in Options.

- Rename BaseCacheKey and ContextualCacheKey with "Data" on end, since
  the cache key is a string.
- Reintroduce CacheKey(Data) removed in #6655; make the
  GenerateCacheKeyFunction type be defined in terms of it. Now calls to
  the `const generateCacheKey` function are type-safe (ie, the second
  arg is a CacheKeyData rather than unknown).
- Describe generateCacheKey hook as a method rather than a field, like
  the other hooks in Options.
@glasser glasser requested a review from trevor-scheer July 11, 2022 19:01
@changeset-bot
Copy link

changeset-bot bot commented Jul 11, 2022

⚠️ No Changeset found

Latest commit: e7d73fc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

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

@glasser
Copy link
Member Author

glasser commented Jul 11, 2022

@kschrade a bit of esprit d'escalier

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit e7d73fc:

Sandbox Source
Apollo Server Typescript Configuration
Apollo Server Configuration

Copy link
Member

@trevor-scheer trevor-scheer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, and appreciate the additional Data naming

@trevor-scheer trevor-scheer merged commit 24c66ad into release-3.10.0 Jul 11, 2022
@trevor-scheer trevor-scheer deleted the glasser/response-cache-6655-followup branch July 11, 2022 19:14
trevor-scheer pushed a commit that referenced this pull request Jul 11, 2022
- Rename BaseCacheKey and ContextualCacheKey with "Data" on end, since
  the cache key is a string.
- Reintroduce CacheKey(Data) removed in #6655; make the
  GenerateCacheKeyFunction type be defined in terms of it. Now calls to
  the `const generateCacheKey` function are type-safe (ie, the second
  arg is a CacheKeyData rather than unknown).
- Describe generateCacheKey hook as a method rather than a field, like
  the other hooks in Options.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants