question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Type Error: Wrong generic types QueryRef (Apollo Client)

See original GitHub issue

Hello! We’re adding Apollo to two projects that use Angular 6 created with the latest Angular CLI. We got the setup done like in the documentation but when we run the project we get these errors:

node_modules/apollo-angular/QueryRef.d.ts(14,33): error TS2314: Generic type 'FetchMoreQueryOptions<TVariables, K>' requires 2 type argument(s).
node_modules/apollo-angular/QueryRef.d.ts(16,60): error TS2314: Generic type 'UpdateQueryOptions<TVariables>' requires 1 type argument(s).

And when we go to compile, the build fails completely. Is there anything we can do here to fix it?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:7
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
cbytecommented, Jun 22, 2018

Neither one of that upgrades works for us, because we are using Ionic, which depends on RxJs 5, whereas the updates of Apollo Client require RxJs 6.

1reaction
kamilkisielacommented, Jun 15, 2018

v1.1.1 contains a fix

Read more comments on GitHub >

github_iconTop Results From Across the Web

Type Error: Wrong generic types QueryRef (Apollo Client) #669
We got the setup done like in the documentation but when we run the project we get these errors: node_modules/apollo-angular/QueryRef.d.ts(14,33): ...
Read more >
Error handling - Apollo GraphQL Docs
Apollo Server's variety of error codes enables requesting clients to respond differently to different error types. You can also create your own custom ......
Read more >
Handling operation errors - Apollo GraphQL Docs
Apollo Client helps you handle these errors according to their type, enabling you to show appropriate information to the user when an error...
Read more >
Error handling - Apollo GraphQL Docs
To help with debugging, Apollo Server defines error subclasses that represent different types of errors that can occur while handling a GraphQL operation...
Read more >
Full Stack Error Handling with GraphQL and Apollo
Validation Phase: Client sent inputs that failed GraphQL type checking; Execution Phase: Client sent bad user input (request out of range, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found