graphql icon indicating copy to clipboard operation
graphql copied to clipboard

Default / coalesce directives are not supported with lists of enums

Open Tenrys opened this issue 3 years ago • 3 comments

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 image

System (please complete the following information):

  • OS: Windows 11 21H2 (OS Build 22000.739)
  • Version: @neo4j/[email protected]
  • Node.js version: v16.13.2

Tenrys avatar Jul 15 '22 11:07 Tenrys

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:

neo4j-team-graphql avatar Jul 15 '22 11:07 neo4j-team-graphql

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!

neo4j-team-graphql avatar Jul 19 '22 14:07 neo4j-team-graphql

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.

neo4j-team-graphql avatar Jul 20 '22 10:07 neo4j-team-graphql