-
Notifications
You must be signed in to change notification settings - Fork 792
GraphQL error: Schema must be an instance of GraphQLSchema #742
Comments
@Ayc0 Are you using P.S -> Assuming you are running latest version of |
I am not connected to a server: I mock the data as the tuto says. But I'm sure that It comes either from react-apollo or from apollo-test-utils: when I git clone, it works but with old packages and when I upgrade every packages, it crashes on both of them (this error with react-apollo) |
Can you post a reproduction with some code? We can't tell where that is coming without being able to see what you are doing. |
@Ayc0 what's the output of |
https://github.com/Ayc0/apollo In the folder |
Last updates of apollo fix my problem |
install the same version of graphql as the one in react-apollo devDependencies list, for example, for react-apollo 1.4.15, just yarn add graphql@0.10.5. |
this is just a version compatibility error between react-apollo ang graphql. |
@stubailo Here's a reproduction: https://github.com/fxlemire/graphql-react-tutorial/tree/part-1 (notice the branch It's basically the entire part 1 of this tutorial I've also tried with graphql@^0.10.5, to no avail. Any help on how to fix this would be much appreciated! EDIT: Now working thanks to @linhdsv |
This tutorial doesn't work anymore but it helps me understand how Apollo sets up a Higher Order Component. |
I tried |
Thanks @linhdsv ! Indeed the |
Thanks @linhdsv . Try $ npm list | grep graphql
client@0.1.0 /Users/xxx/workspace/GitHub/graphql-tutorial/client
│ ├── graphql@0.10.5
│ ├── graphql-tag@2.5.0
│ └─┬ graphql-tools@1.2.3
│ └── @types/graphql@0.9.4
├─┬ graphql@0.11.7
├─┬ graphql-tools@2.5.1
│ │ ├── @types/graphql@0.10.2
│ │ │ ├── graphql@0.10.5
│ │ ├── graphql@0.10.5
│ │ ├── graphql-anywhere@3.1.0 There are two version of graphql: So I try to update my npm by It works for me. |
For those arriving after the battle, I solved things by adding this into my packages.json:
This will instruct Yarn not to nest |
I have tried all above but still encountering below error
I checked graphql packages
Packages installed
|
@pricetula You have two versions of GraphQL include |
Hi @zhoukekestar thanks i got it resolved nothing to do with multiple graphql copies. I also did install Turns out I was using typeDefs incorrectly without making it executable using |
Can also happen trying to import a makeExecutableSchema(...) exported in a different package. |
When I run react-apollo with a mockNetworkInterface (last versions of react-apollo and apollo-test-utils, an error is constantly poping :
The text was updated successfully, but these errors were encountered: