Skip to content
Checkcraft
Practical workflow

GraphQL API testing and validation of data and errors

Get help with your first test →

A GraphQL response arrived, but the expected object is missing. Inspect data and errors separately.

Checkcraft ·

Set the query

Choose the GraphQL body type in the HTTP request editor. Supply query, variables and, if needed, operationName. The example requires your test endpoint to expose an order field; it is not a request to an available public service.

query Order($id: ID!) { order(id: $id) { id status total } }

Supply variables

Paste this JSON into variables and verify endpoint, authentication and content type. Checkcraft creates a body with query and variables, adding a nonempty operationName. Valid JSON variables may still violate server schema types.

{"id":"ORD-1042"}

Validate data and errors

Assert the relevant fields in data.order and handle errors explicitly. Partial data and errors may coexist. Define an expected status and no-error condition for a passing case, then test an unknown ID separately.

Limit the conclusion

Checking returned JSON is not an audit of the entire GraphQL schema. This workflow covers HTTP request and response testing. Subscriptions, federation and performance require separate workflows. Start with one operation and a deliberately failing result.

References

GraphQL response

Start with the linked example and compare its result with your own test requirement.

Ask a person

Get help with your first test

Tell us what you want to test or where you got stuck. We can help you start Checkcraft, choose an example and understand your first run. You can ask before downloading.

The Telegram group is public: do not post passwords, tokens or confidential work data. A description of your task is enough to start.

You can also email us support@checkcraft.ru

No account required. We will reply by email. This is a support request, not a newsletter subscription.