kamilkisiela / apollo-client-rxjs

Adds RxJS to ApolloClient
http://apollostack.com
44 stars 12 forks source link

Issues with typescript 2.4.1 & rxjs 5.4.2 #42

Open olaf89 opened 7 years ago

olaf89 commented 7 years ago

Class 'RxObservableQuery' incorrectly extends base class 'Observable<ApolloQueryRes ult>'.

I think rxjs updated typings for lift operator. which causes this conflict.

The 'this' context of type 'ApolloQueryObservable<>' is not assignable to method's 'thi s' of type 'Observable<ApolloQueryResult<>>'. Types of property 'lift' are incompatible.

pfrendo commented 7 years ago

I have created a PR for this

https://github.com/kamilkisiela/apollo-client-rxjs/pull/44

pfrendo commented 7 years ago

@kamilkisiela

avalla commented 6 years ago

any news about this issue?

picheli20 commented 6 years ago

@avalla the PR still open https://github.com/kamilkisiela/apollo-client-rxjs/pull/44

dogmatico commented 6 years ago

Hi, I have made another pull request (https://github.com/kamilkisiela/apollo-client-rxjs/pull/45) to bring some ideas to the table about how to deal with this issue. In particular, I have augmented the interface Observable to overload the lift method.

Aside from an update in the test to use Promises in the asserts, there aren't additional changes.

I have tested angular-apollo and our projects using this branch with Typescript@2.4.2 and they went Ok.

However, to be honest, I don't know if this can introduce issues with older versions of Typescript.

patriknil90 commented 6 years ago

I'm also having some issues with this. Got rid of compile errors for apollo-client@1.9.0 and rxjs@5.4.2 by updating typescript to 2.4.2 but now got this in apollo-client-rxjs... Any workarounds anyone else have used, other than reverting back to older typescipt version?

cime commented 6 years ago

@patriknil90 you can disable strict generic checks by puttings this line in the compilerOptions of tsconfig.app.json:

 "noStrictGenericChecks": true
patriknil90 commented 6 years ago

Thanks @cime . Worked perfectly as a workaround!

kamilkisiela commented 6 years ago

Could you try out v0.6.0-rc.1?

KeithGillette commented 6 years ago

Updating to typescript@2.5.2 (and apollo-client@1.9.2) did not produce these errors that I experienced with typescript@2.4.x.

kamilkisiela commented 6 years ago

Guys, if you're using apollo-client-rxjs with apollo-angular the issue will be fixed in the next release. We take a different approach to make ApolloClient to work with RxJS. No more TypeScript issues!

kamilkisiela commented 6 years ago

If you use apollo-angular then we changed the way ApolloClient works with RxJS. You can check it here: apollographql/apollo-angular#377

No more this kind of issues.