Skip to content

Commit 35387c0

Browse files
authored
Bug fix: Redis response cache type mismatch (#3181)
* Type fix * changeset
1 parent a852e34 commit 35387c0

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.changeset/moody-crabs-train.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+
Type fix to match `@envelop/response-cache-redis`

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ export interface ResponseCachePluginExtensions {
7777
export interface Cache extends EnvelopCache {
7878
get(
7979
key: string,
80-
): Promise<ExecutionResult<Record<string, unknown>, ResponseCachePluginExtensions> | undefined>;
80+
): PromiseOrValue<
81+
ExecutionResult<Record<string, unknown>, ResponseCachePluginExtensions> | undefined
82+
>;
8183
}
8284

8385
export function useResponseCache(options: UseResponseCacheParameter): Plugin {

0 commit comments

Comments
 (0)