Skip to content

Commit befaf3c

Browse files
fix missing export of response-cache plugin (#3092)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 38f95ef commit befaf3c

File tree

6 files changed

+25
-6
lines changed

6 files changed

+25
-6
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@graphql-yoga/plugin-response-cache': patch
3+
---
4+
dependencies updates:
5+
- Updated dependency [`@envelop/response-cache@^6.1.0`
6+
↗︎](https://www.npmjs.com/package/@envelop/response-cache/v/6.1.0) (from `^6.0.0`, in
7+
`dependencies`)

.changeset/early-masks-try.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphql-yoga/plugin-response-cache': minor
3+
---
4+
5+
Expose `hashSHA256` sha256 implementation to ease cache key factory customisation.

.changeset/pretty-numbers-fetch.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphql-yoga/plugin-response-cache': patch
3+
---
4+
5+
Fix missing export of `Cache` type and `cacheControlDirective` exports

packages/plugins/response-cache/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"graphql-yoga": "^5.0.0"
4848
},
4949
"dependencies": {
50-
"@envelop/response-cache": "^6.0.0"
50+
"@envelop/response-cache": "^6.1.0"
5151
},
5252
"devDependencies": {
5353
"graphql": "^16.6.0",

packages/plugins/response-cache/src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import {
1212
UseResponseCacheParameter as UseEnvelopResponseCacheParameter,
1313
} from '@envelop/response-cache';
1414

15+
export { cacheControlDirective, hashSHA256 } from '@envelop/response-cache';
16+
1517
export type BuildResponseCacheKeyFunction = (
1618
params: Omit<Parameters<EnvelopBuildResponseCacheKeyFunction>[0], 'context'> & {
1719
request: Request;
@@ -72,7 +74,7 @@ export interface ResponseCachePluginExtensions {
7274
[key: string]: unknown;
7375
}
7476

75-
interface Cache extends EnvelopCache {
77+
export interface Cache extends EnvelopCache {
7678
get(
7779
key: string,
7880
): Promise<ExecutionResult<Record<string, unknown>, ResponseCachePluginExtensions> | undefined>;

pnpm-lock.yaml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)