Error: Network error: Cannot read property 'append' of undefined
See original GitHub issuethere was an error sending the query Error: Network error: Cannot read property 'append' of undefined
at new ApolloError (ApolloError.js:34)
at Object.error (QueryManager.js:118)
at SubscriptionObserver.error (zen-observable.js:178)
at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:388)
at Object.onInvoke (core.es5.js:3890)
at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:387)
at Zone.webpackJsonp.../../../../zone.js/dist/zone.js.Zone.run (zone.js:138)
at zone.js:858
at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421) at Object.onInvokeTask (core.es5.js:3881)
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Network error: Cannot read property 'append' of undefined ...
It seems there is documentation mismatch. The solution that is working for me is: const auth = setContext((request, previousContext) => ({ ...
Read more >What does Cannot read property 'append' of undefined error ...
The error means that the object you're trying to call .append on is undefined and that call is in the AddItem method. ·...
Read more >ERROR TypeError: Cannot read property 'append' of undefined
I want to build a column chart but I got the following error: ERROR TypeError: Cannot read property 'append' of undefined. The error...
Read more >Uncaught TypeError: Cannot read property of undefined In
Uncaught TypeError : Cannot read property of undefined error occurs in Chrome when you read a property or call a method on an...
Read more >Cannot read properties of undefined' - JavaScript Debugging
How To Fix 'Uncaught TypeError : Cannot read properties of undefined ' - JavaScript Debugging.
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’d encountered the same issue before. I’d successfully passed the authorization header by directly putting it inside the headers object.
@kamilkisiela @apollographql HI, I was about to open a new issue but I saw this first. I had the same problem.
The solution is in this doc: https://github.com/apollographql/apollo-angular/tree/master/packages/apollo-angular-link-headers
It seems there is documentation mismatch.
The solution that is working for me is:
const auth = setContext((request, previousContext) => ({ authorization: token }));
Below is the full service, and it is working: note: the token is gather by KeyCloak and is used on HTTP and WS