Closed HaveF closed 7 years ago
terminal information:
I20170424-09:07:38.947(8)? { [Error: GraphQL error: Cannot query field "undefined" on type "Query".]
I20170424-09:07:38.948(8)? graphQLErrors:
I20170424-09:07:38.948(8)? [ { message: 'Cannot query field "undefined" on type "Query".',
I20170424-09:07:38.949(8)? locations: [Object] } ],
I20170424-09:07:38.949(8)? networkError: null,
I20170424-09:07:38.949(8)? message: 'GraphQL error: Cannot query field "undefined" on type "Query".',
I20170424-09:07:38.949(8)? extraInfo: undefined,
I20170424-09:07:38.950(8)? queryErrors: [ [Circular] ] }
W20170424-09:07:38.955(8)? (STDERR) Mon Apr 24 2017 09:07:38 GMT+0800 (CST) 'error while server-rendering' 'Error: GraphQL error: Cannot query field "undefined" on type "Query".\n at ApolloError.Error (native)\n at new ApolloError (/Users/HaveF/Desktop/newTech/vulcan_tutorial/node_modules/apollo-client/apollo.umd.js:1845:28)\n at /Users/HaveF/Desktop/newTech/vulcan_tutorial/node_modules/apollo-client/apollo.umd.js:2691:41\n at /Users/HaveF/Desktop/newTech/vulcan_tutorial/node_modules/apollo-client/apollo.umd.js:3115:25\n at Array.forEach (native)\n at /Users/HaveF/Desktop/newTech/vulcan_tutorial/node_modules/apollo-client/apollo.umd.js:3112:27\n at Array.forEach (native)\n at QueryManager.broadcastQueries (/Users/HaveF/Desktop/newTech/vulcan_tutorial/node_modules/apollo-client/apollo.umd.js:3109:42)\n at QueryManager.broadcastNewStore (/Users/HaveF/Desktop/newTech/vulcan_tutorial/node_modules/apollo-client/apollo.umd.js:2499:14)\n at /Users/HaveF/Desktop/newTech/vulcan_tutorial/node_modules/apollo-client/apollo.umd.js:3167:44\n => awaited here:\n at Function.Promise.await (/Users/HaveF/.meteor/packages/promise/.0.8.8.1ba92yi++os+web.browser+web.cordova/npm/node_modules/meteor-promise/promise_server.js:35:12)\n at Object.options.preRender (packages/vulcan:routing/lib/server/routing.jsx:52:22)\n at generateSSRData (packages/vulcan:routing/lib/server/router.jsx:51:15)\n at sendSSRHtml (packages/vulcan:routing/lib/server/router.jsx:79:25)\n at packages/vulcan:routing/lib/server/router.jsx:136:11\n at /Users/HaveF/Desktop/newTech/vulcan_tutorial/node_modules/react-router/lib/match.js:67:5\n at /Users/HaveF/Desktop/newTech/vulcan_tutorial/node_modules/react-router/lib/createTransitionManager.js:99:11\n at done (/Users/HaveF/Desktop/newTech/vulcan_tutorial/node_modules/react-router/lib/AsyncUtils.js:79:19)\n at /Users/HaveF/Desktop/newTech/vulcan_tutorial/node_modules/react-router/lib/AsyncUtils.js:85:7\n at getComponentsForRoute (/Users/HaveF/Desktop/newTech/vulcan_tutorial/node_modules/react-router/lib/getComponents.js:11:5)'
After recheck the doc, copy/paste code, still get error, but different one.
graphiql is fine:
make a new branch for reproduce this issue:
Hi, Before fragments part, the console throw error
Error: Fragment "MoviesItemFragment" not registered.
, it is exactly like the doc said:After I done the fragments part, I can not get the doc result, but instead a error.
It seems the fragments not works, the graphql query string is not properly constructed.
So, what can I do next?