Skip to content

GraphQL fields should generally be nullable

Nick Thomas requested to merge (removed):nullable-graphql-fields into master

What does this MR do?

Condenses some recommendations from graphql best practices and a blog post provided by @simon_mansfield into a short segment on when to use non-nullable fields in graphql schemas.

We've had more than one issue recently caused by non-nullable fields that needed to become nullable, and struggled with how to make this happen tidily in a versionless schema. Biasing us to "make things nullable more often" is a reasonable first iteration to solve this problem, I think. The wording here may be too prescriptive, but it's a starting point.

We could consider adding static analysis to enforce this.

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Merge request reports