When To Use GraphQL Non-Null Fields
Caleb Meredith

Hello, Caleb! Thank you for this nice article! I have some question about returning null value for provided not-nullable field:

type User {
 id: ID!

This works fine when the user with provided id is exist in database. But if not?

I got this response from GraphQL:

Cannot return null for non-nullable field User.id.

That I must do in this situation?

Thank you!

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.