juniorGraphQL

What does non-nullable (required) mean in a GraphQL schema?

Updated Apr 28, 2026

Short answer

A non-nullable field, denoted by an exclamation mark (!), guarantees that the server will never return a null value for it.

Deep explanation

If a resolver for a non-nullable field returns null (or throws an error), the GraphQL execution engine propagates the null error up the tree until it hits a nullable parent, potentially returning an error for the entire query.

Real-world example

Enforcing that every User object must have an id, so the frontend doesn't need to write null-checks for it.

Common mistakes

  • Making every field non-nullable. In distributed systems, partial failures happen. If a non-critical field fails but is non-nullable, it destroys the whole object response.

Follow-up questions

  • What is null bubbling?

More GraphQL interview questions

View all →