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

Type mismatch when passing GraphQLClient instance to @rtk-query/graphql-request-base-query graphqlRequestBaseQuery #2931

Open
joemar12 opened this issue Nov 22, 2022 · 5 comments

Comments

@joemar12
Copy link

There's a type mismatch when passing an instance of GraphQLClient from graphql-request v5 to graphqlRequestBaseQuery.
The error looks like this:
Type 'import(".../node_modules/graphql-request/dist/index").GraphQLClient' is not assignable to type 'import(".../node_modules/@rtk-query/graphql-request-base-query/node_modules/graphql-request/dist/index").GraphQLClient'. Types have separate declarations of a private property 'url'.

@Biggo89
Copy link

Biggo89 commented Dec 19, 2022

Hello everyone, facing the same issue.
Is there any update on this issue?

@phryneas
Copy link
Member

You probably have two different versions of graphql-request installed. Use your package manager to narrow it down to only one.

@jcfergus
Copy link

The currently-published @rtk-query/graphql-request-base-query has a dependency on graphql-request@4.3.0.
It seems like if you're using npm, forcing an npm install --save graphql-request@4.3.0 will resolve this issue.

@donovan-ecargo
Copy link
Contributor

Would the maintainers be open to a PR updating the version of graphql-request to 6.1.0 in the @rtk-query/graphql-request-base-query package?

@markerikson
Copy link
Collaborator

@donovan-ecargo yep!

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

No branches or pull requests

6 participants