graphql-go / graphql-go/graphql

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

Open
#617 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
10.1k
Forks
845
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.