Add EnumTypeMap for GraphQL enum materialization#57
Draft
FionaBronwen wants to merge 2 commits into
Draft
Conversation
FionaBronwen
force-pushed
the
fionabronwen/mutation-engine
branch
from
January 7, 2026 20:05
07d4df7 to
1f2480d
Compare
FionaBronwen
force-pushed
the
fionabronwen/enum-typemap
branch
from
January 7, 2026 20:05
54b3fd9 to
e842ba5
Compare
FionaBronwen
force-pushed
the
fionabronwen/mutation-engine
branch
2 times, most recently
from
January 7, 2026 20:42
7841973 to
66f0f3d
Compare
FionaBronwen
force-pushed
the
fionabronwen/enum-typemap
branch
from
January 7, 2026 20:42
e842ba5 to
2400d78
Compare
FionaBronwen
force-pushed
the
fionabronwen/mutation-engine
branch
from
January 7, 2026 21:14
66f0f3d to
80c468b
Compare
FionaBronwen
force-pushed
the
fionabronwen/enum-typemap
branch
from
January 7, 2026 21:15
2400d78 to
964a436
Compare
FionaBronwen
force-pushed
the
fionabronwen/mutation-engine
branch
4 times, most recently
from
January 7, 2026 22:00
17e8959 to
e651f96
Compare
FionaBronwen
force-pushed
the
fionabronwen/enum-typemap
branch
3 times, most recently
from
January 8, 2026 15:45
78e20f6 to
5652caa
Compare
FionaBronwen
marked this pull request as ready for review
January 8, 2026 15:51
FionaBronwen
force-pushed
the
fionabronwen/mutation-engine
branch
2 times, most recently
from
January 15, 2026 21:09
04ae5e7 to
83f1ddc
Compare
FionaBronwen
force-pushed
the
fionabronwen/enum-typemap
branch
2 times, most recently
from
January 23, 2026 21:04
463b824 to
398ae95
Compare
FionaBronwen
force-pushed
the
fionabronwen/enum-typemap
branch
from
January 23, 2026 21:08
398ae95 to
1704900
Compare
FionaBronwen
marked this pull request as draft
February 26, 2026 16:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces
EnumTypeMap, a concrete implementation of theTypeMapabstraction for converting TypeSpec Enums to GraphQL EnumTypes, and refactors the registry to use it.Changes
EnumTypeMap (
src/type-maps/enum.ts):TypeMap<Enum, GraphQLEnumType>Registry refactoring (src/registry.ts):
TSPTypeContextand materialization logic withEnumTypeMapaddEnum()andmaterializeEnum()now delegate toEnumTypeMapallRegisteredNamesset for future cross-TypeMap duplicate detection