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.

Incompatible typing with `graphql^16.0.0` produces `error TS2430: Interface 'SubscriptionResult<TData>' incorrectly extends interface 'ExecutionResult<ObjMap<unknown>, ObjMap<unknown>>'.`

See original GitHub issue

Describe the bug When attempting to update an apollo-angular project to graphql^16.0.0 project transpilation produces error TS2430: Interface 'SubscriptionResult<TData>' incorrectly extends interface 'ExecutionResult<ObjMap<unknown>, ObjMap<unknown>>'.:

Error: node_modules/apollo-angular/types.d.ts:30:18 - error TS2430: Interface 'SubscriptionResult<TData>' incorrectly extends interface 'ExecutionResult<ObjMap<unknown>, ObjMap<unknown>>'.
  Types of property 'data' are incompatible.
    Type 'TData' is not assignable to type 'ObjMap<unknown>'.

30 export interface SubscriptionResult<TData> extends ExecutionResult {
                    ~~~~~~~~~~~~~~~~~~

To Reproduce Run tsc on project depending on apollo-angular@2.6.0 & graphql^16.0.0 with a tsconfig.json observing the default skipLibCheck: false.

Expected behavior Updating to graphql^16.0.0 should work without error.

Environment:

├── @angular/cli@13.0.3 
├── @angular/core@13.0.2 
├── @apollo/client@3.5.3 
├── @types/graphql@14.5.0
├── apollo-angular@2.6.0 
├── graphql@16.0.1 
└── typescript@4.4.4 

Additional context The bug description has been updated to correct the original incorrect attribution of this typing error to upgrading @apollo/client^3.5.0 when in fact the upgrade causing the problem was from graphql@15.7.2 to graphql@16.0.1.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:10
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
vslipchenkocommented, Dec 4, 2021

Created a draft PR #1739

5reactions
russcarvercommented, Nov 18, 2021

Same issue for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Interface 'FetchResult<TData, C, E>' incorrectly extends ...
Actual outcome: TypeScript error. node_modules/@apollo/client/link/core/types.d.ts:20:18 - error TS2430: Interface 'FetchResult ' incorrectly extends ...
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