- Introduction
- Quick start
- Philosophy
- Comparison
- Default behaviors
- Limitations
- Debugging runbook
- FAQ
- Mocking HTTP
- Mocking GraphQL
- Mocking WebSocket
- Integrations
- API
- CLI
- Best practices
- Recipes
Variables
Reading the GraphQL operation variables.
You can read the variables passed along the intercepted GraphQL operation by accessing the variables
property of the response resolver’s argument:
graphql.query('ListUsers', ({ variables }) => {
console.log(variables) // { limit: 10 }
})
query ListUsers($limit: Int!) {
users(limit: $limit) {
id
name
}
}