GraphQL: getting started

Lesson 07 · 11 min

Errors, context, and permissions

In GraphQL an error is part of the response, not just a status.

A GraphQL response has two fields: data and errors. If the resolver of one field breaks, that field becomes null, and errors gets an entry with message, path, and extensions.code. The rest of the data arrives as usual — a partial response. The user and permissions are checked through context, which the server creates for every request from the Authorization header.

Sign in to continue

The rest of this lesson opens after sign up

The first lesson of every course is open without an account. To read on, solve the practice and use Ask, create a free account or log in.