how can I install apollo-angular on angular 14?

1.9k views Asked by At

I have this error while testing apollo-angular on angular 14

Error: node_modules/apollo-angular/types.d.ts:11:54 - error TS2312: An interface can only extend an object type or intersection of object types with statically known members.

11 export interface MutationResult<TData = any> extends FetchResult { ~~~~~~~~~~~~~~~~~~ how to reproduce the error:

  1. Create a new angular 14 project
  2. add apollo-angular on the project like here in the doc https://apollo-angular.com/docs/get-started

Can you help me? I really need to solve this problem now

enter image description here

2

There are 2 answers

0
Matthieu Riegler On

There is a current issue.

Use the version 3.6.9 of @apollo/client as a workaround.

0
Rich On

Turns out you must upgrade to the version 4.1.0 of the apollo-angular. I was able to fix the issue after upgrading.

Check out this release.