Sending GraphQL Queries, Mutations, and Variables

GraphQL vs REST in Postman

Postman has a dedicated GraphQL request mode, which sends a single POST request containing a query string and variables, instead of many different REST endpoints.

Writing a Query

The GraphQL tab includes a Query editor with schema-aware autocomplete (when the schema is available), making it easy to select fields and nested objects to return.

Using Variables

PartPurpose
QueryDefines what data to fetch or which mutation to run
GraphQL VariablesSupplies dynamic values referenced in the query, e.g. $id

Sending Mutations

Mutations follow the same structure as queries but are used to create, update, or delete data - Postman sends them the same way, just with a mutation defined in the query editor.

Whether REST or GraphQL, every API also needs to be checked for weaknesses - let's move into testing for vulnerabilities and rate limiting.

Ready to master Postman API Testing Course?

Join Uncodemy's hands-on training and build real-world API testing skills with expert mentors.

Explore Course