Can't find field X on object undefined
See original GitHub issueHi all,
I’m getting this error when using next-with-apollo
in this project here.
I’m using the Query
component rather than the graphql
function.
GraphQL error occurred [getDataFromTree] { Error: Network error: Can't find field getCategories on object undefined.
at new ApolloError (/home/egidio/Workspace/youvector/website/node_modules/apollo-client/bundle.umd.js:85:32)
at /home/egidio/Workspace/youvector/website/node_modules/apollo-client/bundle.umd.js:1039:45
at /home/egidio/Workspace/youvector/website/node_modules/apollo-client/bundle.umd.js:1411:21
at Array.forEach (<anonymous>)
at /home/egidio/Workspace/youvector/website/node_modules/apollo-client/bundle.umd.js:1410:22
at Map.forEach (<anonymous>)
at QueryManager.broadcastQueries (/home/egidio/Workspace/youvector/website/node_modules/apollo-client/bundle.umd.js:1405:26)
at /home/egidio/Workspace/youvector/website/node_modules/apollo-client/bundle.umd.js:988:35
graphQLErrors: [],
networkError:
Error: Can't find field getCategories on object undefined.
at /home/egidio/Workspace/youvector/website/node_modules/aws-appsync/node_modules/apollo-cache-inmemory/lib/bundle.umd.js:429:27
at Array.forEach (<anonymous>)
at StoreReader.diffQueryAgainstStore (/home/egidio/Workspace/youvector/website/node_modules/aws-appsync/node_modules/apollo-cache-inmemory/lib/bundle.umd.js:426:36)
at StoreReader.readQueryFromStore (/home/egidio/Workspace/youvector/website/node_modules/aws-appsync/node_modules/apollo-cache-inmemory/lib/bundle.umd.js:401:25)
at processOfflineQuery (/home/egidio/Workspace/youvector/website/node_modules/aws-appsync/lib/link/offline-link.js:158:34)
at /home/egidio/Workspace/youvector/website/node_modules/aws-appsync/lib/link/offline-link.js:114:28
at new Subscription (/home/egidio/Workspace/youvector/website/node_modules/zen-observable/lib/Observable.js:183:34)
at Observable.subscribe (/home/egidio/Workspace/youvector/website/node_modules/zen-observable/lib/Observable.js:262:14)
at /home/egidio/Workspace/youvector/website/node_modules/aws-appsync/lib/client.js:175:67,
message:
"Network error: Can't find field getCategories on object undefined.",
extraInfo: undefined }
That error is server-side. Data is fetched correctly on client-side. Is that the expected behaviour?
Issue Analytics
- State:
- Created 5 years ago
- Comments:16 (8 by maintainers)
Top Results From Across the Web
Apollo GraphQL Client 'Network error: Can't find field XXXX on ...
I can successfully query the AWS AppSync endpoint using a curl command, but the exact same GraphQL executed over the Apollo client is...
Read more >Object.defineProperty() - JavaScript - MDN Web Docs
When the property specified doesn't exist in the object, Object.defineProperty() creates a new property as described. Fields may be omitted ...
Read more >Getting error "The undefined value has no properti...
You are getting this error because you are trying to access a property of an object that doesn't exist. I have explained this...
Read more >Uncaught TypeError: Cannot read property of undefined In
This particular error is probably easiest to understand from the perspective of undefined, since undefined is not considered an object type at all...
Read more >Resolve Error: Undefined Function or Variable - MathWorks
Undefined function or variable 'x'. These errors usually indicate that MATLAB cannot find a particular variable or MATLAB program file in the current ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, even so, don’t take the chance of having a memory leak.
Amazing, good work 👍 💃