dotansimha / dotansimha/graphql-code-generator-community

typescript-apollo-angular does not work with apollo/client@3.7

Open
#305 0 comments 4 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
137
Forks
195
Avg merge
6h 20m
Merged PRs (30d)
16

Description

### Which packages are impacted by your issue?

@graphql-codegen/typescript-apollo-angular

### Describe the bug

@apollo/client@3.7 updated their TS supprort in the following commit: https://github.com/apollographql/apollo-client/commit/47435e879ebc867d9fc3de5b6fd5785204b4dbd4#diff-3d26f2a8fa68cc60ff4736cbafa9986e14eed51e341fc224ca4ac01ee8d671a6

The change now required that the generic argument of WatchQueryOptions must now extend OperationVariables.
And the result is the following type error:
```
Error: apps/frontend/src/generated/GqlClient.ts:205163:81 - error TS2344: Type 'V' does not satisfy the constraint 'OperationVariables'.

205163 interface WatchQueryOptionsAlone extends Omit, 'query' | 'variables'> {}
~
```

### Your Example Website or App

NA

### Steps to Reproduce the Bug or Issue

1. create an angular codegen app
2. update to apollo client 3.7

### Expected behavior

create a working ts file

### Screenshots or Videos

_No response_

### Platform

- OS: macos
- NodeJS: 16.17.0
- `graphql` version: 16.6.0
- `@graphql-codegen/*` version(s): 3.5.6

### Codegen Config File

_No response_

### Additional context

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.