firebase / firebase/firebase-tools

dataconnect: Export all generated types/enums at root and convert Enums to TS-idiomatic string unions

Open
#10,908 2 comments 0 reactions 0 assignees View on GitHub
emulator: dataconnect type: feature request
Dominant language
TypeScript
Stars
4.5k
Forks
1.3k
Avg merge
1d 12h
Merged PRs (30d)
84

Description

Operation response types, model shapes, and enum definitions are generated internally but not cleanly re-exported at the top-level index module. Developers are forced to use utility types like Awaited> or deep internal imports just to type component props, state, or helper functions.

GraphQL enums are currently generated as standard TypeScript enum constructs. In modern TypeScript, standard enums carry runtime overhead, nominal typing quirks, and poor ergonomics when passing raw strings (e.g., from API payloads, form inputs, or route params).

Contributor guide

Open the contributing guide

Research direction

Start by locating the generated types and the top-level index module mentioned in the issue, then trace how GraphQL enums are emitted. Done means operation response types, model shapes, and enum definitions are re-exported at the root, and enums use TypeScript string unions so raw strings remain ergonomic.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, developer-experience
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.