without disableOffline:true graphql operations failing with error in readFromStore
See original GitHub issueI’ve an AppSync application which is configured to use Cognito.
When I’m configuring the AppSyncClient without the disableOffline: true
option I am ending up with this error upon executing any query:
graphQLErrors: [],
networkError:
Error: Can't find field listKiosks on object undefined.
at /project/node_modules/aws-appsync/node_modules/apollo-cache-inmemory/src/readFromStore.ts:233:15
at Array.forEach (<anonymous>)
at StoreReader.diffQueryAgainstStore (/project/node_modules/aws-appsync/node_modules/apollo-cache-inmemory/src/readFromStore.ts:231:26)
at StoreReader.readQueryFromStore (/project/node_modules/aws-appsync/node_modules/apollo-cache-inmemory/src/readFromStore.ts:178:17)
at processOfflineQuery (/project/node_modules/aws-appsync/lib/link/offline-link.js:158:34)
at /project/node_modules/aws-appsync/lib/link/offline-link.js:114:28
at new Subscription (/project/node_modules/zen-observable/lib/Observable.js:183:34)
at Observable.subscribe (/project/node_modules/zen-observable/lib/Observable.js:262:14)
at /project/node_modules/aws-appsync/lib/client.js:175:67,
If was quite hard to figure out that disableOffline is needed to make this work.
I don’t know what is the expected behavior:
- Shall it work with offline capabilities in a node application (not necessarily from Lambda only)?
or
- We could provide a better error message that under node this functionality is not available and if node environment detected, then bail out with a friendly error message during client initialization?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Handling operation errors - Apollo GraphQL Docs
These are errors encountered while attempting to communicate with your GraphQL server, usually resulting in a 4xx or 5xx response status code (and...
Read more >Mutations and Input Types - GraphQL
It's often convenient to have a mutation that maps to a database create or update operation, like setMessage , return the same thing...
Read more >Error Masking – GraphQL Yoga
Unexpected errors can be caused by failed connections to remote ... sensible defaults as error masking is enabled without you needing to ...
Read more >Handling GraphQL errors like a champ with unions and ...
Without a doubt, one of the best features of GraphQL is its awesome type system. Together with tools like the GraphQL Code Generator...
Read more >A Guide to GraphQL Errors
❗️Con: No Schema. We love GraphQL for it's type system. The errors key of a GraphQL response, commonly called "Top-Level" errors, don ...
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 know but I don’t want disable offline functionalities.
@attilah this is a solution that works like a charm if you do not need offline capabilities…