I tried to do a signup mutation in the playground but I am getting an error which I cannot understand, tried a lot of ways to fix it like adding an authorisation header by getting a token from prisma token also, quite stuck..
That error occurs if you have two different versions of graphql
in your entire dependency tree.
Your dependencies and dev dependencies for package.json
need to use the same version of graphql
, and all those dependencies need to have graphql
as their peer dependency, like this:
"peerDependencies": {
"graphql": "^0.11.0 || ^0.12.0 || ^0.13.0"
}
Note that in your own package.json
, you don't need the peer dependency. Here's an example of dependencies in your package.json
that fulfill the requirements I mentioned above:
"dependencies": {
"graphql-yoga": "1.4.3",
"prisma-binding": "1.5.16"
},
"devDependencies": {
"graphql-cli": "2.15.8",
"prisma": "1.3.3"
}
I copied the dependencies from here.
Update your package.json
to the above dependencies , then rm -rf node_modules yarn.lock
and npm install
or yarn
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With