apollographql / apollographql/apollo-tooling
[codegen] Maximum call stack size exceeded while generating type files (typescript)
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 460
- PR merge metrics
- No merged PRs in 30d
Description
I'm using apollo's codegen for a few months but recently got this error:
```
$ ❯ apollo client:codegen --target=typescript --watch --tagName=gql --addTypename --globalTypesFile=types/graphql-global-types.ts types
✔ Loading Apollo Project
✔ Generating query files with 'typescript' target - wrote 47 files
RangeError: Maximum call stack size exceeded
```
Any idea where that could come from? Or how to get more information (debug logs)?
Thanks
Contributor guide
Research direction
Start by reproducing the reported `apollo client:codegen --target=typescript --watch` command and inspect the available output around the stack overflow. Trace the TypeScript code-generation entry point to identify the input that causes the failure; done means the command completes without exceeding the call stack and the generated type files remain correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100