graphql / graphql/graphql-spec
Ability to add directives on extended enum values
Open
- Dominant language
- JavaScript
- Stars
- 14.6k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
This is currently disallowed by the specification:
```graphql
enum Foo {
bar
baz
}
extend enum Foo {
baz @myDirective
}
```
From https://spec.graphql.org/draft/#sec-Enum-Extensions.Type-Validation:
> 3. All values of an Enum type extension must not already be a value of the original Enum.
Our immediate use-case is that we generate code on the client side and would like to allow renaming certain enum values (in case their name is a reserved keyword, or clashes with other fields in the generated code).
Has this ever come up and would it make sense to allow it?
Contributor guide
Assessment
This issue has not been assessed yet.