Skip to main content

GraphQL Support

With Requestly, you can alter GraphQL API requests and responses through the use of the request payload filter in the modify request and modify response rules.

Modifying graphQL responses

GraphQL requests are directed at a single endpoint. So for quering, it is a common practice to pass operationName to differentiate similar queries or for verbose logging on the backend. To modify the responses, you can target query and operationName using Modify Response rule and then modify the responses.

Response Rule - GraphQL payload

You can target GraphQL requests using the operation name in request body. To do so add:

  • Payload JSON Key, e.g., operationName
  • Value, e.g., getUsers

Payload also supports nested path.

Modifying graphQL queries

The graphQL queries can be modified by using the modify request body rule where the request body can be altered.

You can refer this blog for detailed explanation.