> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alumio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Execute GraphQL request

> Executes HTTP requests to GraphQL APIs.

Sends a request to a GraphQL API and places the response into the data. GraphQL APIs let you ask for exactly the fields you need in a single query, so this is handy for enriching the data mid-route, for example fetching a product with just its name and price. It works the same way as the HTTP request step, but the request body is a GraphQL query written in a dedicated editor. By default the response replaces the data flowing through this step, so the next steps work with what the API returned.

This documentation describes: [Schema](/schemas/transformer/graphql-transformer)

## Fields

**HTTP API connection**

Optional

A pre-configured connection that sets shared settings for the request, such as a base address, default headers, and authentication. Leave it empty to use the default HTTP API connection.

See the [http-client](/references/http-client) reference.

**Request URI**

Required

The address of the GraphQL endpoint. If the selected HTTP API connection already has a base address, start this with a slash to append a path to it; otherwise enter the full URL such as `https://example.org/graphql`. Placeholders are supported, so you can build the address from the data.

**Request Method**

Optional

The HTTP method used to send the query. Defaults to GET; GraphQL queries are commonly sent with POST. Placeholders are supported.

**Request Parameters**

Optional

The GraphQL query to run, written in the query editor. For GET requests it is sent as query parameters; for POST and PUT requests it is sent in the request body. Defaults to `&{@}`, the whole output of this step, and you can use placeholders anywhere in the query to insert values from the data.

## Sample data

This step makes a live GraphQL call, so the result depends on the endpoint you call. The example below fetches a product by id with a POST request, using a placeholder to insert the id from the data into the query. The GraphQL response replaces the data.

| Field | Value |
| - | - |
| Request URI | `https://example.org/graphql` |
| Request Method | POST |
| Request Parameters | the query below |

```
{
    product(id: "&{identifier}") {
        identifier
        name
        price
    }
}
```

A typical response then replaces the data:

```json theme={null}
{
    "identifier": 1234,
    "name": "Red T-Shirt M",
    "price": 19.95
}
```

```json Configuration theme={null}
{
  "prototype": "graphql-transformer",
  "parameters": {
    "request": {
      "uri": "https://example.org/graphql",
      "method": "post",
      "payload": "{ product(id: \"&{identifier}\") { identifier name price } }"
    }
  }
}
```

To keep both your original data and the response, follow this with a merger step. See [Placeholders](/references/placeholders) for how to reference values such as `&{identifier}` in the query.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.