Skip to content

Commit db7f386

Browse files
docs: include name when creating GraphQLEnumValueDefinition (#2078)
### 📝 Description Was using the docs and this caught me out, you have to set the enum name when building a new GraphQLEnumValueDefinition otherwise you will receive `Name must be non-null, non-empty and match [_A-Za-z][_0-9A-Za-z]* - was 'null'` ### 🔗 Related Issues
1 parent 6d24045 commit db7f386

File tree

1 file changed

+1
-0
lines changed
  • website/docs/schema-generator/writing-schemas

1 file changed

+1
-0
lines changed

website/docs/schema-generator/writing-schemas/enums.md

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ val statusEnumType = GraphQLEnumType.newEnum()
4646
.name("Status")
4747
.values(Status.values().map {
4848
GraphQLEnumValueDefinition.newEnumValueDefinition()
49+
.name(it.name)
4950
.value(it.name)
5051
.build()
5152
})

0 commit comments

Comments
 (0)