Incompatible typing with `graphql^16.0.0` produces `error TS2430: Interface 'SubscriptionResult<TData>' incorrectly extends interface 'ExecutionResult<ObjMap<unknown>, ObjMap<unknown>>'.`
See original GitHub issueDescribe 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:
- Created 2 years ago
- Reactions:10
- Comments:9 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Created a draft PR #1739
Same issue for me.