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.

Interface 'FetchResult<TData, C, E>' incorrectly extends interface 'ExecutionResult<ObjMap<unknown>, ObjMap<unknown>>

See original GitHub issue

Intended 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:open
  • Created 2 years ago
  • Reactions:11
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

20reactions
juane1000commented, Nov 9, 2021

@juane1000 @gajus The package version numbers I need for this specific issue are:

@apollo/client, graphql, typescript.

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

4reactions
lano-vargascommented, Feb 3, 2022

Had same issue. After downgrading “graphql”: “^16.3.0”, TO “graphql”: “^15.0.0”, seem to have worked

Read more comments on GitHub >

github_iconTop 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 >

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