Schema must be an instance of GraphQLSchema #1
Comments
I am also encountering this issue on the current master (a758655) on Window 7, npm v3.10.10, node v6.11.3, and Chromium 60.0.3112.78. The demo page seems to work well on the same browser. Steps to reproduceFirst,
In the browser, the page does not seem to load, and the DevTools shows errors as pictured: Other, possibly related, issuesThe build produced by Also, on this commit,
|
Cause of the errorIn general, this error seem to be caused in a few different ways by libraries that depend on GraphQL. In this case, it seems to be through aor-simple-graphql-client -> apollo-client -> graphql. Here are some issue reports referencing this error, which seem to fall into different categories:
aor-graphql-simple-client has been deprecated in later versions. The successor, aor-graphql, is clearly labeled as a work in progress by the developer. How is this bug introduced?On a higher level, I would venture to guess that this issue is introduced by a combination of bugs that creep in through the inconsistent dependency resolution of package.json. The demo might work, if the exact versions of dependencies are provided. On a side note, this is one of the benefits of the "deterministic", "super reliable" lockfile format used in yarn. Moving forward?Follow the new demo in aor-graphql. |
This demo will be deprecated soon. The |
Not anymore, it works with the latest release. Unfortunately, I'm currently on a customer project and I don't know when I will have time for this. Rest assured that the marmelab team will continue to work on it though |
Awesome! I will take a look later today. Thank you @djhi |
Hello,
I recently cloned this repo to get familiar with it. However, after running npm install and npm start I get the following error:
Uncaught (in promise) Error: Network error: Schema must be an instance of GraphQLSchema. Also ensure that there are not multiple versions of GraphQL installed in your node_modules directory.
I believe this might be an issue between Apollo and GraphQL itself but I am not entirely sure. But package.json looks like this:
{
"name": "admin-on-rest-graphql-demo",
"version": "1.0.0",
"private": true,
"devDependencies": {
"babel-eslint": "^7.1.1",
"babel-polyfill": "^6.16.0",
"eslint": "^3.10.2",
"eslint-config-airbnb": "^13.0.0",
"eslint-config-airbnb-base": "^10.0.1",
"eslint-import-resolver-node": "^0.2.3",
"eslint-module-utils": "^2.0.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^2.2.3",
"eslint-plugin-react": "^6.7.1",
"fakerest": "^1.2.1",
"fetch-mock": "^5.5.0",
"gh-pages": "^0.12.0",
"react-scripts": "0.9.5"
},
"dependencies": {
"admin-on-rest": "~1.0.0",
"aor-language-french": "^1.8.0",
"aor-rich-text-input": "^1.0.0",
"aor-simple-graphql-client": "^0.0.7",
"apollo-client": "^1.2.0",
"apollo-test-utils": "^0.3.0",
"casual-browserify": "^1.5.12",
"graphql": "^0.9.6",
"graphql-tools": "^0.11.0",
"lodash.upperfirst": "^4.3.1",
"material-ui": "~0.16.4",
"pluralize": "^4.0.0",
"prop-types": "~15.5.7",
"react": "~15.5.4",
"react-dom": "~15.5.4",
"react-redux": "~5.0.4",
"react-router-dom": "~4.1.0",
"react-tap-event-plugin": "~2.0.1",
"redux-form": "~6.6.2",
"redux-saga": "~0.14.6"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"deploy": "gh-pages -d build"
},
"homepage": "http://marmelab.com/admin-on-rest-graphql-demo/"
}
I know this is just a demo but I would greatly appreciate any help. I will play around with it myself as well, I think some of the dependencies need to be updated, but if someone comes up with a conclusion/fix before me, awesome!
The text was updated successfully, but these errors were encountered: