You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Type 'import("node_modules/@envelop/response-cache/typings/cache").Cache' is not assignable to type 'Cache'.
The types returned by 'get(...)' are incompatible between these types.
Type 'PromiseOrValue<Maybe<ExecutionResult<ObjMap<unknown>, ObjMap<unknown>>>>' is not assignable to type 'Promise<ExecutionResult<Record<string, unknown>, ResponseCachePluginExtensions> | undefined>'.
Type 'undefined' is not assignable to type 'Promise<ExecutionResult<Record<string, unknown>, ResponseCachePluginExtensions> | undefined>'.ts(2322)
index.d.ts(8, 5): The expected type comes from property 'cache' which is declared here on type 'UseResponseCacheParameter'
I have a solution locally based on changing the Envelop plugins. Need access to https://github.com/n1ru4l/envelop to make my PR. I'll check with the team about it tomorrow.
Describe the bug
When using
@graphql-yoga/plugin-response-cache
plugin, and following the documented example here: https://the-guild.dev/graphql/yoga-server/docs/features/response-caching#external-cache to provide acreateRedisCache
cache instance causes a Typescript error:Your Example Website or App
https://codesandbox.io/p/sandbox/determined-carlos-7qx3nj?file=%2Fsrc%2Fmain.ts%3A32%2C31
Steps to Reproduce the Bug or Issue
Create a Typescript instance of Yoga using the useResponseCache plugin, with the cache option set to a cache instance created with createRedisCache.
Expected behavior
The server should start without any typescript compilation errors.
Screenshots or Videos
No response
Platform
Additional context
Seems to be similar to: #2905
The text was updated successfully, but these errors were encountered: