API Testing / Quiz

GraphQL Queries and Mutations, Tested

Variables, non-null bubbling, mutation side effects, aliases, and introspection, the mechanics of testing a schema-first API.

Difficulty
Medium
Format
Quiz
Points
150
Estimate
9 min

// MISSION BRIEF

Your Mission

GraphQL puts the query shape in the client's hands and the errors in a JSON array. This quiz is about the testing mechanics that follow: parameterizing with variables, asserting on mutation side effects, non-null failures, and the introspection endpoint you forgot to lock down.

// FIRST CONTACT

Battle teaser

A mutation returns HTTP 200 with data: { updateUser: null } and an errors entry. The correct assertion:

  1. ARetry until data is non-null
  2. BIgnore errors, GraphQL always returns them
  3. CTreat it as success because the status is 200
  4. DCheck the errors array and confirm no partial side effect persisted; null data plus errors means the mutation failed
Answers, scoring, hints, and the full battle stay sealed.

// SKILL TAGS

apigraphqlmutationsschema