graphql-go / graphql

An implementation of GraphQL for Go / Golang
MIT License
9.86k stars 838 forks source link

Cannot return null for non-nullable field (EVEN THOUGH THIS FIELD IS NULLABLE) #617

Open ImperatorOfIntellectualism opened 2 years ago

ImperatorOfIntellectualism commented 2 years ago

Trying to do a basic query: query Query { threads { id createdAt title op Posts } }

Here is the error: "message": "Cannot return null for non-nullable field Thread.Posts.",

But here is this field: @Field(() => [String]) Posts: [string];

What the hell is this bug?? Can you fix it?