apollographql / apollographql/apollo-tooling

Any way to disable globalTypes generation?

Open
#1,179 17 comments 5 reactions 0 assignees View on GitHub
:tada: feature 🤖 component - codegen
Dominant language
TypeScript
Stars
3k
Forks
460
PR merge metrics
No merged PRs in 30d

Description

I'm trying to use codegen in an existing codebase and can't run it on all files as that fails due to numerous issues (imported fragments from other modules, anonymous operations, etc)

What I've instead been doing is running codegen on new code. It works but whenever globalTypes is generated it overwrites previous data – this leaves older operation types without enums

Is there a way to disable globalTypes generation and keep enums local?

Contributor guide

Open the contributing guide

Research direction

Start at the codegen entry point that produces globalTypes and reproduce generation on separate batches of operations, including imported fragments and anonymous operations. Done means an option can disable globalTypes generation while enums remain local and previously generated operation types are not overwritten.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.