Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error TS2430: Interface 'ExecutionResult<TData>' incorrectly extends interface 'ExecutionResult<ObjMap<unknown>, ObjMap<unknown>>'. #1226

Closed
KeithGillette opened this issue Jun 27, 2022 · 1 comment · Fixed by #1258
Milestone

Comments

@KeithGillette
Copy link

KeithGillette commented Jun 27, 2022

Bug report

Describe the bug

Running tsc from typescript@4.7.4 with default skipLibCheck: false on a project importing @graphql/api@0.33.2 and graphql@16.5.0 generates the following error:

node_modules/@accounts/graphql-api/node_modules/@graphql-tools/utils/Interfaces.d.ts:3:18 - error TS2430: Interface 'ExecutionResult<TData>' incorrectly extends interface 'ExecutionResult<ObjMap<unknown>, ObjMap<unknown>>'.
  Types of property 'data' are incompatible.
    Type 'TData' is not assignable to type 'ObjMap<unknown>'.

3 export interface ExecutionResult<TData = Record<string, any>> extends GraphQLExecutionResult {

To Reproduce

See bug description.

Expected behavior

The project should transpile without error with TypeScript's default skipLibCheck: false setting.

Screenshots

N/A

System information

  • accounts-js: 0.33.2
  • graphql: 16.5.0
  • typescript: 4.7.4

Additional context

The version of graphql in @accounts/graphql-api dependencies is 2 major versions behind.

@KeithGillette
Copy link
Author

The outdated graphql peer dependency also results in npm install errors with npm>=8.6when attempting to use the latest graphql:

npm ERR! Could not resolve dependency:
npm ERR! peer graphql@"^14.6.0 || ^15.0.0" from @accounts/graphql-api@0.33.2
npm ERR! node_modules/@accounts/graphql-api
npm ERR!   @accounts/graphql-api@"0.33.2" from the root project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants