Open reggermont opened 2 months ago
got blocked by same issue
here too
same here with this issue
Are you all still seeing this? If so, can I get an example so that we can get this fixed? Make sure you are at the latest as we added in additional support recently.
Sure ! I am in a strapi v5 configuration, where the graphql plugin is used, here are the specs :
import { KeyvAdapter } from "@apollo/utils.keyvadapter";
import { ErrorsAreMissesCache} from "@apollo/utils.keyvaluecache";
import Keyv from 'keyv';
export default ({ env }) => ({
graphql: {
config: {
endpoint: "/graphql",
shadowCRUD: true,
playgroundAlways: true,
depthLimit: 20,
amountLimit: 100,
defaultLimit: 10,
maxLimit: 200,
//highlight begin
apolloServer: {
tracing: true,
introspection: true,
cache:
new ErrorsAreMissesCache(
new KeyvAdapter(
new Keyv(env("REDIS_URL"),{
namespace:'apollo-cache',
ttl: 3600 * 1000 //1 hour TTL
})
)
)
//highlight end
Where typescript says : Argument of type 'Keyv<any>' is not assignable to parameter of type 'Keyv<string, Record<string, unknown>>'. Type 'Keyv<any>' is missing the following properties from type 'Keyv<string, Record<string, unknown>>': getMaxListeners, rawListeners, listenerCount, prependListener, and 2 more.
Versions are : keyv@5.1.2 @keyv/redis@3.0.1 @apollo/utils.keyvadapter@3.1.0 @apollo/utils.keyvaluecache3.1.0
@simonjamois - thanks and we are looking into this.
@simonjamois Do you have a repo where I can check out the error? I tried to reproduce it but couldn’t.
The error seems fixed ! Just needed to update @apollo/utils.keyvadapter@3.1.0 > @4.0.0 to allow the module to sync with keyv@5.1.2 Thanks a lot ;)
Related to https://github.com/apollographql/apollo-utils/issues/457
TypeScript returns the following error: