graphql-compose / graphql-compose-mongoose

Mongoose model converter to GraphQL types with resolvers for graphql-compose https://github.com/nodkz/graphql-compose
MIT License
708 stars 94 forks source link

New feature Request: To allow null, string in Enum #384

Closed benny1hk closed 2 years ago

benny1hk commented 2 years ago

Allow using null and empty String and number as the first char in Enum keys, which make easier for legacy mongoose project to migrate.

nodkz commented 2 years ago

Thanks for contribution

But be aware of a NULL value. According to GraphQL implementation, it can not return null values as NULL in output types. But for input it will work correctly - you pass NULL as a string in arguments it transformed to null in resolver args.

https://github.com/graphql-compose/graphql-compose-mongoose/blob/a7a54856fb58675205f41979b2e32c983390499d/src/__tests__/github_issues/384-test.ts#L109-L114

github-actions[bot] commented 2 years ago

:tada: This PR is included in version 9.7.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: