Interface 'FetchResult<TData, C, E>' incorrectly extends interface 'ExecutionResult<ObjMap<unknown>, ObjMap<unknown>>
See original GitHub issueIntended outcome:
No TypeScript errors.
Actual outcome:
TypeScript error.
node_modules/@apollo/client/link/core/types.d.ts:20:18 - error TS2430: Interface 'FetchResult<TData, C, E>' incorrectly extends interface 'ExecutionResult<ObjMap<unknown>, ObjMap<unknown>>'.
Types of property 'data' are incompatible.
Type 'TData | null | undefined' is not assignable to type 'ObjMap<unknown> | null | undefined'.
Type 'TData' is not assignable to type 'ObjMap<unknown> | null | undefined'.
Type 'TData' is not assignable to type 'ObjMap<unknown>'.
20 export interface FetchResult<TData = {
How to reproduce the issue:
Use tsc
with {"skipLibCheck": false}
Versions
System:
OS: macOS 11.6
Binaries:
Node: 16.11.1 - ~/.nvm/versions/node/v16.11.1/bin/node
Yarn: 1.22.17 - ~/.nvm/versions/node/v16.11.1/bin/yarn
npm: 8.0.0 - ~/.nvm/versions/node/v16.11.1/bin/npm
Browsers:
Chrome: 95.0.4638.69
Firefox: 92.0
Safari: 14.1.2
npmPackages:
@apollo/client: ^3.4.17 => 3.4.17
@apollo/link-error: ^2.0.0-beta.3 => 2.0.0-beta.3
@apollo/react-hooks: ^4.0.0 => 4.0.0
@apollo/react-ssr: ^4.0.0 => 4.0.0
apollo-link-sentry: ^3.0.2 => 3.0.2
Issue Analytics
- State:
- Created 2 years ago
- Reactions:11
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Error @angular/fire build incorrectly extends interface
I solved by change "node_modules/@angular/fire/compat/firestore/interfaces.d.ts" following the instructions in this link.
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
I reverted back to graphql@15.7.2 and that resolved the issue using the latest apollo-client version.
To answer your question: @apollo/client@3.4.17 , graphql@16.0.1 , typescript@4.4.4
Had same issue. After downgrading “graphql”: “^16.3.0”, TO “graphql”: “^15.0.0”, seem to have worked