API testing

Test a mutation end to end

Hard120 pts~45 min
  • GraphQL mutations
  • Cross-interface verification
Practice app · Acme REST API

A live REST + GraphQL API with auth, validation, pagination, rate limiting and an interactive request console.

BASE_URL
/api/practice
Console app
/lab/api-testing-test-a-mutation-end-to-end

Your starter code already declares BASE_URL — call the API relative to it.

Objective

Create a user through a GraphQL mutation and verify it through the REST API.

Your task

  1. 1POST BASE_URL + "/graphql" with mutation { createUser(name: "Gql User", email: "<unique>") { id name email } }.
  2. 2Assert no errors and capture data.createUser.id.
  3. 3GET BASE_URL + "/users/{id}" → assert 200 and the same email.
  4. 4DELETE BASE_URL + "/users/{id}" to clean up → assert 204.

Acceptance criteria

  • POST /graphql returns 200
  • GET /users/{id} returns 200
  • DELETE /users/{id} returns 204
  • At least 3 assertions pass

Constraints

  • Use a unique email per run, e.g. qa.<timestamp>@example.test — emails must not already exist (409 EMAIL_TAKEN).

Fixtures

apiKey
tqa_live_key_123
basicUser
admin
basicPassword
secret
username
qa@target.dev
password
Test@123

API testing · API Testing · GraphQL