graphql / graphql/graphql-spec

Number String or Int not allowed in Enum

Open
#945 5 comments 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
14.6k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

When defining an enum with a Number String like `"11201"` or an Int like`11201`, it will result in a schema validation error `Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "11201" does not.`

Why are number strings or Int not allowed to be an enum? Thank you!

snippet:
```
enum IsoClass {
11201
11202
11203
}
```

- assignee(s): @acao
- source:

---
_Note: Action Item issues are reviewed and closed during Working Group
meetings._

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.