Calling map of QueryObservable throws an error
See original GitHub issueIntended outcome: I am trying to map the result of QueryObservable.
Actual outcome: TypeError: Cannot read property ‘generateQueryId’ of undefined
How to reproduce the issue:
apolloClient
.watchQuery({ query })
.map(result => result.data)
Versions 3.0.0-beta.43
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Error being thrown when observable is inside another ...
MergeMap and Map are not accepting error handling. You are using the mergeMap argument resultSelector that is throwing the error you see.
Read more >Cannot call map on the observable returned by watchQuery
import { Observable } from 'rxjs'; Observable.create(observer => { client.watchQuery({ query }).subscribe({ next: observer.next, error: ...
Read more >RxJs Error Handling: Complete Practical Guide
The catchError operator takes as input an Observable that might error out, and starts emitting the values of the input Observable in its...
Read more >Handling operation errors - Apollo GraphQL Docs
By default, Apollo Client throws away partial data and populates the error.graphQLErrors array of your useQuery call (or whichever hook you're using).
Read more >RxJS - Error Handling Operators - DEV Community
Returns an Observable that mirrors the source Observable with the exception of an error. If the source Observable calls error, this method will ......
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
Workaround:
i’m having the same problem using “@apollo/client”: “^3.0.2”