ApolloQueryObservable.map does not exist
See original GitHub issueWhen creating a new project with the angular cli and importing ApolloQueryObservable. The map function is somehow not available:
this.users = this.apollo.watchQuery<UsersQuery>({
query: UsersQueryNode,
variables: {
id: data.users,
},
}).map(result => result.data.users) as any;
The TS compiler says:
Property ‘map’ does not exist on type ‘ApolloQueryObservable<UsersQuery>’.
My dependcies:
"dependencies": {
"@angular/animations": "^4.0.0",
"@angular/common": "^4.0.0",
"@angular/compiler": "^4.0.0",
"@angular/core": "^4.0.0",
"@angular/forms": "^4.0.0",
"@angular/http": "^4.0.0",
"@angular/platform-browser": "^4.0.0",
"@angular/platform-browser-dynamic": "^4.0.0",
"@angular/router": "^4.0.0",
"@types/node": "^6.0.78",
"apollo-angular": "^0.13.0",
"apollo-client": "^1.5.0",
"core-js": "^2.4.1",
"rxjs": "^5.1.0",
"zone.js": "^0.8.4"
},
"devDependencies": {
"@angular/cli": "1.1.2",
"@angular/compiler-cli": "^4.0.0",
"@angular/language-service": "^4.0.0",
"@types/jasmine": "2.5.45",
"@types/node": "~6.0.60",
"codelyzer": "~3.0.1",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"karma-coverage-istanbul-reporter": "^1.2.1",
"protractor": "~5.1.2",
"ts-node": "~3.0.4",
"tslint": "~5.3.2",
"typescript": "~2.3.3"
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
ApolloQueryObservable.map does not exist #322 - GitHub
When creating a new project with the angular cli and importing ApolloQueryObservable. The map function is somehow not available: this.users ...
Read more >Subscribing to angular Apollo query observable brings old ...
The problem comes from Apollo's cache. As you're making the same request, it reuses the previous result it got from the request. There...
Read more >Apollo Angular Version 0.11 – The Guild
We've applied this rule to the service as well, so there is no ... First thing, you need to define a function to...
Read more >Reading and writing data to the cache - Apollo GraphQL Docs
Any changes you make to cached data with writeQuery are not pushed to your GraphQL server. If you reload your environment, these changes...
Read more >Handling GraphQL errors like a champ with unions and ...
How would I distinguish a “user does not exist” error from a “user ... You can build some custom function in your client...
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
done see https://github.com/apollographql/angular-docs/pull/59
@davideberlein sure! https://github.com/apollographql/angular-docs/blob/master/source/queries.md#using-with-rxjs (also on each of our doc pages there is a “Edit on Github” button at the bottom)