dotansimha / dotansimha/graphql-code-generator
Property 'enter' does not exist on type '{ readonly enter?: ASTVisitFn<NameNode> ...
- Dominant language
- TypeScript
- Stars
- 11.3k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 23
Description
**Describe the bug**
Getting the following build errors with TS:
```
node_modules/@graphql-codegen/plugin-helpers/oldVisit.d.ts:5:75 - error TS2339: Property 'enter' does not exist on type '{ readonly enter?: ASTVisitFn | undefined; readonly leave: ASTReducerFn; } | { readonly enter?: ASTVisitFn | undefined; readonly leave: ASTReducerFn<...>; } | ... 41 more ... | undefined'.
5 enter?: Partial>;
~~~~~~~
node_modules/@graphql-codegen/plugin-helpers/oldVisit.d.ts:6:75 - error TS2339: Property 'leave' does not exist on type '{ readonly enter?: ASTVisitFn | undefined; readonly leave: ASTReducerFn; } | { readonly enter?: ASTVisitFn | undefined; readonly leave: ASTReducerFn<...>; } | ... 41 more ... | undefined'.
6 leave?: Partial>;
```
**To Reproduce**
Use together:
```
"@graphql-codegen/plugin-helpers": "^2.4.1",
"graphql": "^16.3.0"
```
Then just importing it will trigger the bug:
```ts
import type { Types } from '@graphql-codegen/plugin-helpers';
```
1. My GraphQL schema:
```graphql
N/A
```
2. My GraphQL operations:
```graphql
N/A
```
3. My `codegen.yml` config file:
```yml
N/A
```
**Expected behavior**
Not produce build errors.
**Environment:**
- OS: macOS
- `@graphql-codegen/plugin-helpers`: 2.4.1
- NodeJS: v14.17.6
**Additional context**
N/A
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.