InterviewBuddy
All interview questions

How do GraphQL non-null fields affect error propagation?

Advanced

Answer

If a non-null field cannot resolve, the error propagates to the nearest nullable ancestor, which becomes null. Other unaffected data may still be returned.

Explanation

A chain of non-null ancestors can make the entire data result null.

Example

A failing name: String! can null its nullable User parent.