Skip to content
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

Error with connecting ioredis library #23

Closed
rrostyslav opened this issue Jan 24, 2021 · 6 comments
Closed

Error with connecting ioredis library #23

rrostyslav opened this issue Jan 24, 2021 · 6 comments

Comments

@rrostyslav
Copy link

Hello Ben. Thanks for your Graphql TS video.
I repeat everything you do on it.
I catch an error when trying to replace redis library to ioredis.
Can you help me to resolve this problem please?

image
image

@rrostyslav
Copy link
Author

Full error text: Type 'Redis' is not assignable to type 'RedisClient | Redis | Cluster | undefined'. Type 'import("c:/Users/rrost/Documents/JS/train/graphql/node_modules/@types/ioredis/index").Redis' is not assignable to type 'import("c:/Users/rrost/Documents/JS/train/graphql/node_modules/@types/connect-redis/node_modules/@types/ioredis/index").Redis'. Types of property 'hset' are incompatible. Type 'OverloadedKeyedHashCommand' is not assignable to type 'OverloadedKeyedHashCommand'. Types of parameters 'cb' and 'cb' are incompatible. Types of parameters 'res' and 'res' are incompatible. Type 'number' is not assignable to type '"OK"'.ts(2322) index.d.ts(28, 13): The expected type comes from property 'client' which is declared here on type 'RedisStoreOptions'

@Barklim
Copy link

Barklim commented Jan 30, 2021

@rrachinskiy Привет, нашел в чем проблема? У меня сейчас та же проблема.

@rrostyslav
Copy link
Author

rrostyslav commented Jan 30, 2021

I using as any for now👌. I know this is bad idea

@baptistemcn
Copy link

baptistemcn commented Jan 31, 2021

Hey @rrachinskiy, can you send a screen with your context file maybe ? 👌🏻

@Barklim
Copy link

Barklim commented Feb 1, 2021

@baptistemcn

photo_2021-01-30_21-00-10

@rrostyslav
Copy link
Author

rrostyslav commented Feb 9, 2021

It's seems like this issue has been fixed. Yesterday I tried to use express-session on my new pet project. I am not using GraphQL. It's simple REST API. Now it is working without any type. Check here .
Closing issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants