-
Notifications
You must be signed in to change notification settings - Fork 573
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
Incompatible Typescript Cache
type when using createInMemoryCache
#2905
Comments
yes having the same problem |
I'm having the same problem using |
A possible workaround while it's being fixed is: const cache = createInMemoryCache() as UseResponseCacheParameter['cache']; |
You can try |
Describe the bug
When using the latest
@graphql-yoga/plugin-response-cache
plugin, providing a manually initializedcreateInMemoryCache
cache instance causes a Typescript error:Prior versions of the plugin (1.4.0) did not cause this error.
Your Example Website or App
https://codesandbox.io/p/sandbox/laughing-keldysh-ffhp3k?file=%2Findex.ts%3A4%2C20
Steps to Reproduce the Bug or Issue
Create a Typescript instance of Yoga using the
useResponseCache
plugin, with thecache
option set to a cache instance created withcreateInMemoryCache
.Expected behavior
The server should start normally.
Screenshots or Videos
No response
Platform
Typescript
Additional context
No response
The text was updated successfully, but these errors were encountered: