Skip to content

feat(schema): add directives support to registerEnumType#1807

Open
jlang-ih wants to merge 1 commit intoMichalLytek:masterfrom
jlang-ih:enum-directive-support
Open

feat(schema): add directives support to registerEnumType#1807
jlang-ih wants to merge 1 commit intoMichalLytek:masterfrom
jlang-ih:enum-directive-support

Conversation

@jlang-ih
Copy link
Copy Markdown

@jlang-ih jlang-ih commented Mar 20, 2026

  • Add optional directives: string[] parameter to registerEnumType, enabling directive support on enum types (e.g. directives: ["@cacheControl(maxAge: 30)"])
  • Follow the same directive handling pattern used by ObjectType, InterfaceType, and InputType — directive strings are converted to DirectiveMetadata, processed through getEnumTypeDefinitionNode, and emitted as astNode on the GraphQLEnumType
  • Add tests covering simple directives, directives with arguments, and multiple directives on a single enum

Open with Devin

Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant