# GraphQL

## **Naming Convention**

All GraphQL universal modules should have the following module label and description:

* **Module label**: Execute a GraphQL query
* **Module description**: Performs an arbitrary authorized API call.

<div align="left"><figure><img src="/files/TcDkUf7lJh2VvR8mEbDq" alt="" width="367"><figcaption></figcaption></figure></div>

{% tabs %}
{% tab title="Appearance" %}

<div align="left"><img src="/files/gicMrvYazTNzTNREsdhZ" alt="" width="539"></div>
{% endtab %}

{% tab title="Communication" %}

```json
{
    "url": "https://www.example.com/graphql",
    "method": "{{parameters.method}}",
    "qs": {
		"query": "{{parameters.queryQs}}"
	},
    "headers": {
		"Content-Type": "application/json"
	},
	"body": {
		"query": "{{parameters.queryBody}}",
		"operationName": "{{parameters.operationName}}",
		"variables": "{{if(isArray(parameters.variables), toCollection(parameters.variables, 'key', 'value'), parameters.variables)}}"
	},
	"type": "json",
    "response": {
        "output": {
            "headers": "{{headers}}",
            "body": "{{body}}",
			"statusCode": "{{statusCode}}"
        }
    }
}
```

{% endtab %}

{% tab title="Static parameters" %}
![](/files/f2O47ixl9SKWm0RWAROY)
{% endtab %}

{% tab title="Mappable parameters" %}

```json
[
    {
        "name": "method",
        "type": "select",
        "label": "Method",
        "required": true,
        "default": "POST",
        "options": [
            {
                "label": "GET (introspection query)",
                "value": "GET",
				"nested": [
					{
						"name": "queryQs",
						"label": "Query",
						"type": "text",
						"required": true
					}
				]
            },
            {
                "label": "POST (queries and mutations)",
                "value": "POST",
				"nested": [
					{
						"name": "queryBody",
						"label": "Query",
						"type": "text",
						"required": true
					},
					{
						"name": "operationName",
						"label": "Operation name",
						"type": "text",
						"advanced": true
					},
					{
						"name": "variablesDataSource",
						"label": "Variables data source",
						"type": "select",
						"required": true,
						"advanced": true,
						"default": "array",
						"options": [
							{
								"value": "array",
								"label": "Form",
								"nested": [
									{
										"name": "variables",
										"label": "Variables",
										"type": "array",
										"mappable": {
											"help": "Key-Value pairs as an Array of Collections e.g. `[{key:id,value:123},{key:name,value:'John'},…]`"
										},
										"spec": [
											{
												"name": "key",
												"label": "Key",
												"type": "text"
											},
											{
												"name": "value",
												"label": "Value",
												"type": "text"
											}
										]
									}
								]
							},
							{
								"value": "object",
								"label": "Collection",
								"nested": [
									{
										"name": "variables",
										"label": "Variables",
										"help": "A single Collection e.g. `{id:123,name:'John', …}`",
										"type": "any"
									}
								]
							}
						]
					}
				]
            }
        ]
    }
]
```

{% endtab %}

{% tab title="Interface" %}

```json
[
	{
		"name": "body",
		"type": "any",
		"label": "Body"
	},
	{
		"name": "headers",
		"type": "collection",
		"label": "Headers"
	},
	{
		"name": "statusCode",
		"type": "number",
		"label": "Status code"
	}
]
```

{% endtab %}

{% tab title="Samples" %}

```json
{}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.make.com/custom-apps-documentation/app-components/modules/universal-module/graphql.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
