Possible Redux/caching error - renders AppSync unusable
See original GitHub issueI’m getting this error
Error sending the query '<name>' Error: Can't find field <name> on object (ROOT_QUERY) undefined
I’m not sure what I’m doing wrong, but I did notice appsync
in the Redux store is an empty object. Seems like the cache is trying to read from something that isn’t there.
Issue Analytics
- State:
- Created 6 years ago
- Comments:17 (4 by maintainers)
Top Results From Across the Web
Caching and compression - AWS AppSync
AWS AppSync's server-side data caching capabilities make data available in a high speed, in-memory cache, improving performance and decreasing latency.
Read more >Redux Essentials, Part 7: RTK Query Basics
RTK Query is a powerful data fetching and caching tool. ... use the status booleans and the data/error fields to render the UI...
Read more >Cache Behavior
When data is fetched from the server, RTK Query will store the data in the Redux store as a 'cache'. When an additional...
Read more >Redux Essentials, Part 8: RTK Query Advanced Patterns
It's possible for the result argument in these callbacks to be undefined if the response has no data or there's an error, so...
Read more >Automated Re-fetching
Note that either the result or error arguments may be undefined based on whether the mutation was successful or not. Cache tags. RTK...
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
I take it back, the above solution is no good. It causes problems with Vue DevTools because it expects the DOM to be there and it’s not right away.
So I went with this solution:
In
App.vue
, in the script block:Then simply make sure the root div in
App
is<div v-if="hydrated">
so that nothing mounts until hydration is complete.Thanks @manueliglesias, you saved me from pulling my hair out 😃