Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error on angular 4.2.5 #327

Closed
razzaghi opened this issue Jul 8, 2017 · 7 comments
Closed

error on angular 4.2.5 #327

razzaghi opened this issue Jul 8, 2017 · 7 comments
Milestone

Comments

@razzaghi
Copy link

razzaghi commented Jul 8, 2017

apollo-angular/node_modules/apollo-client-rxjs/build/src/RxObservableQuery.d.ts (7,22): Class 'RxObservableQuery' incorrectly extends base class 'Observable<ApolloQueryResult>'.
Types of property 'lift' are incompatible.
Type '(operator: Operator<ApolloQueryResult, ApolloQueryResult>) => Observable<ApolloQueryResu...' is not assignable to type '(operator: Operator<ApolloQueryResult, R>) => Observable'.
Types of parameters 'operator' and 'operator' are incompatible.
Type 'Operator<ApolloQueryResult, R>' is not assignable to type 'Operator<ApolloQueryResult, ApolloQueryResult<{}>>'.
Type 'R' is not assignable to type 'ApolloQueryResult<{}>'.

@beagleknight
Copy link

beagleknight commented Jul 12, 2017

I managed to fix some of this errors using the Observable class directly.

Instead of this:

this.apollo.watchQuery({
  ...  
}).combineLatest(other$, ...)

I used this:

Observable.combineLatest(
  this.apollo.watchQuery({
    ...  
  }),
  other$,
  ...
)

@beagleknight
Copy link

@razzaghi My CI build the project successfully so I suspected it was related to the dependencies cache. I performed a cleanup of my node_modules (rm -rf node_modules && yarn cache clean && yarn) and it works as expected.

@beagleknight
Copy link

I still have the same problem :(. I updated yarn and I start getting the same error again:

ERROR in /Users/beagleknight/projects/codegram/empresaula/teacher-panel/node_modules/apollo-client-rxjs/build/src/RxObservableQuery.d.ts (7,22): Class 'RxObservableQuery<T>' incorrectly extends base class 'Observable<ApolloQueryResult<T>>'.
  Types of property 'lift' are incompatible.
    Type '<R>(operator: Operator<ApolloQueryResult<T>, ApolloQueryResult<R>>) => Observable<ApolloQueryResu...' is not assignable to type '<R>(operator: Operator<ApolloQueryResult<T>, R>) => Observable<R>'.
      Types of parameters 'operator' and 'operator' are incompatible.
        Type 'Operator<ApolloQueryResult<T>, R>' is not assignable to type 'Operator<ApolloQueryResult<T>, ApolloQueryResult<{}>>'.
          Type 'R' is not assignable to type 'ApolloQueryResult<{}>'.

@beagleknight
Copy link

beagleknight commented Jul 13, 2017

@razzaghi The problem is being adressed here kamilkisiela/apollo-client-rxjs#44

@kamilkisiela
Copy link
Owner

Hi all!

Try to add apollo-client-rxjs@0.6.0-rc.1 as a dependency in your project and tell me how it works for you ;)

@abdulhaq-e
Copy link

It didn't solve the problem, PR #45 did though, I tested it.

@kamilkisiela
Copy link
Owner

Next version of apollo-angular will solve this #377

@kamilkisiela kamilkisiela added this to the 1.0 milestone Oct 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants