graphql
graphql copied to clipboard
Default / coalesce directives are not supported with lists of enums
Describe the bug An error is thrown when trying to default a non-nullable list of non-nullable enums to an empty list. Defaulting to a list with values also does not work.
Type definitions
enum MyEnum {
FOO
BAR
}
type MyType {
enumList: [MyEnum!]! @default(value: [])
}
Expected behavior I expect to be able to just be able to default my list of enums to an empty one if the field unspecified while creating an item.
Screenshots

System (please complete the following information):
- OS: Windows 11 21H2 (OS Build 22000.739)
- Version: @neo4j/[email protected]
- Node.js version: v16.13.2
Many thanks for raising this bug report @Tenrys. :bug: We will now attempt to reproduce the bug based on the steps you have provided.
Please ensure that you've provided the necessary information for a minimal reproduction, including but not limited to:
- Type definitions
- Resolvers
- Query and/or Mutation (or multiple) needed to reproduce
If you have a support agreement with Neo4j, please link this GitHub issue to a new or existing Zendesk ticket.
Thanks again! :pray:
This bug report has been assigned high priority to fix. If you wish to contribute a fix, please branch from master and submit your PR with the base set to master. Thanks!
We've been able to confirm this bug using the steps to reproduce that you provided - many thanks @Tenrys! :pray: We will now prioritise the bug and address it appropriately.