watchQuery broken with rxjs 6.0.0-rc.0 and rxjs-compat 6.0.0-rc.0
See original GitHub issueconst GetTodo = gql`
query getTodo {
getTodo(id: "1234") {
id
name
completed
}
}
`;
...
ngOnInit() {
this._apollo.query({ query: GetTodo })
.subscribe(x => console.log(x));
// OK
this._apollo.watchQuery<any>({ query: GetTodo })
.valueChanges
.subscribe(x => console.log(x));
// DashboardComponent_Host.ngfactory.js? [sm]:1 ERROR TypeError: You provided an invalid object where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.
}
...
here is the call stack:
here is the package.json (excerpt)
"dependencies": {
"@angular/animations": "5.2.9",
"@angular/cdk": "^5.2.3",
"@angular/common": "5.2.9",
"@angular/compiler": "5.2.9",
"@angular/core": "5.2.9",
"@angular/forms": "5.2.9",
"@angular/http": "5.2.9",
"@angular/material": "^5.2.3",
"@angular/platform-browser": "5.2.9",
"@angular/platform-browser-dynamic": "5.2.9",
"@angular/router": "5.2.9",
"apollo-angular": "^1.0.1",
"apollo-angular-link-http": "^1.0.2",
"apollo-cache-inmemory": "^1.1.12",
"apollo-client": "^2.2.8",
"core-js": "^2.4.1",
"graphql": "^0.13.2",
"graphql-tag": "^2.8.0",
"jwt-decode": "^2.2.0",
"rxjs": "6.0.0-rc.0",
"rxjs-compat": "6.0.0-rc.0",
"zone.js": "^0.8.23"
},
when I downgrade to rxjs 5.5.8, it works perfectly.
Sorry that I can’t reproduce the error at stackblitz, since I don’t know any public api. If you know some, I would love to do so. Thanks
Issue Analytics
- State:
- Created 5 years ago
- Reactions:7
- Comments:14 (6 by maintainers)
Top Results From Across the Web
watchQuery broken with rxjs 6.0.0-rc.0 and rxjs-compat 6.0 ... - GitHub
watchQuery broken with rxjs 6.0.0-rc.0 and rxjs-compat 6.0.0-rc.0 #545 ... That's because RxJS no longer uses polyfill of Symbol.observable .
Read more >rxjs-compat - npm
This is a rewrite of Reactive-Extensions/RxJS and is the latest production-ready version of RxJS. This rewrite is meant to have better ...
Read more >Angular 5 to 6 Without Backward Compatible RxJS (rxjs-compat)
I'm involved in the rather arduous task of migrating a project from Angular 5.2.11 to 6.0.0, and I'm having some difficulty with RxJS...
Read more >rxjs-compat - NPM Package Overview - Socket.dev
Here, we're using the built-in pipe method on Observables to combine operators. See pipeable operators for more information. CommonJS via npm.
Read more >cannot find module 'rxjs' or its corresponding type declarations
It worked fine with rxjs@7.0.0-rc.2 , but not with rxjs@7.0.0 . I suspect the references and the typesVersions addition are to blame. What...
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
upgrading to 1.1.0-rc.0 works!
@bradleybeighton 1.1.0-rc.0 is available right now, about 1.1.0 after the weekend, for sure.