graphql-compose / graphql-compose/graphql-compose-mongoose
How to skip adding enums to the generated schema?
- Dominant language
- TypeScript
- Stars
- 706
- Forks
- 98
- PR merge metrics
- No merged PRs in 30d
Description
I've defined some fields in my mongoose Schemas like the following:
```
{
country: {
type: 'String',
enum: ['United States', 'Great Britain', ...]
}
}
```
which apparently doesn't conform to the GraphQL enum validation criteria, since I'm seeing the following error when trying to `composeWithMongoose` a schema with the above enum:
```
Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "United States" does not.
```
I would like to keep my database-level validation as-is, so is there a way I can generate a GraphQL schema which would just ignore any enum validation?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.