---
schema_version: "1"
id: 8dfaa0f6f5d08336a38b33bb72a827a1961c0a35d129e36c30fa204da0a6b019
title: APIkit for GraphQL Module Reference
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/apikit/latest/apikit-graphql-module-reference.md
canonical_url: https://docs.mulesoft.com/apikit/latest/apikit-graphql-module-reference
source_site: docs.mulesoft.com
content_type: documentation
content_hash: e8185082bacded2fc831a2bb29dd4ee2a25fecef676ccf14177ed1bcf4820f40
description: MuleSoft Documentation Site
release: 4.x
latest: true
---
---
product: APIkit
version: 4.x
is-latest-version: true
---

# APIkit for GraphQL Module Reference

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Integrate GraphQL APIs in Mule with the APIkit for GraphQL module: reference the GraphQL schema
artifact, tune router limits, and wire `Route`, `Serialize`, and data fetcher or loader sources.
Later sections document configuration parameters, operations, and sources for the XML you generate
or edit after scaffolding.

## Configurations

### Config

Default configuration

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><tbody><tr><td><p>Name</p></td><td><p>Type</p></td><td><p>Description</p></td><td><p>Default Value</p></td><td><p>Required</p></td></tr><tr><td><p><code>Name</code></p></td><td><p>String</p></td><td><p>The name for this configuration. Connectors reference the configuration with this name.</p></td><td><p>None</p></td><td><p>Yes</p></td></tr><tr><td><p><code>API definition</code></p></td><td><p>String</p></td><td><p>Defines the path to the API definition resource, for example: <code>resource::7ddfc767-c5b3-4583-9997-a468e251acd2:posts:1.0.0:graphql:zip:api.graphql</code></p></td><td><p>None</p></td><td><p>Yes</p></td></tr><tr><td><p><code>Introspection Enabled</code></p></td><td><p>Boolean</p></td><td><p>Enables schema introspection.</p></td><td><p>false</p></td><td><p>No</p></td></tr><tr><td><p><code>Max Query Depth Allowed</code></p></td><td><p>Number</p></td><td><p>The maximum depth a query can have. The value must be greater than 1.</p></td><td><p>100</p></td><td><p>No</p></td></tr><tr><td><p><code>Max Query Complexity Allowed</code></p></td><td><p>Number</p></td><td><p>The maximum number of data fields a query can include. The value must be greater than 1.</p></td><td><p>100</p></td><td><p>No</p></td></tr><tr><td><p><code>Name</code></p></td><td><p>String</p></td><td><p>The identifier of this element is used to reference it in other components.</p></td><td><p>None</p></td><td><p>Yes</p></td></tr></tbody></table>

#### Associated Operations

- [Route](#route)

- [Serialize](#serialize)

- [Serialize Batch](#serialize-batch)

#### Associated Sources

- [Data Fetcher](#data-fetcher)

- [Data Loader](#data-loader)

## Operations

### Route

`<graphql-router:route>`

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><div><div><p><code>Configuration</code></p></div></div></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The name of the configuration to use</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>Yes</p></div></div></td></tr><tr><td><div><div><p><code>Content</code></p></div></div></td><td><div><div><p>Any</p></div></div></td><td><div><div><p>Content of the message (usually, the payload)</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p><code>Output MIME Type</code></p></div></div></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The MIME type of the payload that this operation outputs.</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p><code>Output Encoding</code></p></div></div></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The encoding of the payload that this operation outputs</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p><code>Config Ref</code></p></div></div></td><td><div><div><p>ConfigurationProvider</p></div></div></td><td><div><div><p>The name of the configuration you use to execute this component</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>Yes</p></div></div></td></tr><tr><td><div><div><p>Streaming Strategy</p></div></div></td><td><div><div><ul><li><p><a href="#repeatable-in-memory-stream">Repeatable In Memory Stream</a></p></li><li><p><a href="#repeatable-file-store-stream">Repeatable File Store Stream</a></p></li><li><p>Non-Repeatable Stream</p></li></ul></div></div></td><td><div><div><p>Configure repeatable streaming strategy</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p><code>Target Variable</code></p></div></div></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The name of a variable on which the operation output is placed</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p><code>Target Value</code></p></div></div></td><td><div><div><p>String</p></div></div></td><td><div><div><p>An expression that is evaluated against the operation output and the effect of that expression is stored in the target variable</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div><div><p>No</p></div></div></td></tr></tbody></table>

#### Output

<table><colgroup><col> <col></colgroup><tbody><tr><td><p><strong>Type</strong></p></td><td><p>Any</p></td></tr></tbody></table>

#### Configurations

- [Config](#config)

### Serialize

`<graphql-router:serialize>`

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><div><div><p><code>Configuration</code></p></div></div></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The name of the configuration you use</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>Yes</p></div></div></td></tr><tr><td><div><div><p><code>Inbound Content</code></p></div></div></td><td><div><div><p>Any</p></div></div></td><td><div><div><p>Content of the message (usually, the payload)</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p><code>Config Ref</code></p></div></div></td><td><div><div><p>ConfigurationProvider</p></div></div></td><td><div><div><p>The name of the configuration you use to execute this component</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>Yes</p></div></div></td></tr><tr><td><div><div><p><code>Object Type Name</code></p></div></div></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The object-type name</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>Yes</p></div></div></td></tr><tr><td><div><div><p><code>Field Name</code></p></div></div></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The field name</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p><code>Target Variable</code></p></div></div></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The name of a variable on which the operation output is placed</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p><code>Target Value</code></p></div></div></td><td><div><div><p>String</p></div></div></td><td><div><div><p>An expression that is evaluated against the operation output and the effect of that expression is stored in the target variable</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div><div><p>No</p></div></div></td></tr></tbody></table>

#### Output

<table><colgroup><col> <col></colgroup><tbody><tr><td><p><strong>Type</strong></p></td><td><p>Any</p></td></tr></tbody></table>

#### Configurations

- [Config](#config)

### Serialize Batch

`<graphql-router:serialize-batch>`

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><div><div><p><code>Configuration</code></p></div></div></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The name of the configuration you use</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>Yes</p></div></div></td></tr><tr><td><div><div><p><code>Object Type Name</code></p></div></div></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The object-type name</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>Yes</p></div></div></td></tr><tr><td><div><div><p><code>Inbound Content</code></p></div></div></td><td><div><div><p>Any</p></div></div></td><td><div><div><p>Content of the message (usually, the payload)</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr><tr><td><div><div><p><code>Config Ref</code></p></div></div></td><td><div><div><p>ConfigurationProvider</p></div></div></td><td><div><div><p>The name of the configuration you use to execute this component</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>Yes</p></div></div></td></tr><tr><td><div><div><p><code>Target Variable</code></p></div></div></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The name of a variable on which the operation output is placed</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p><code>Target Value</code></p></div></div></td><td><div><div><p>String</p></div></div></td><td><div><div><p>An expression that is evaluated against the operation output and the effect of that expression is stored in the target variable</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div><div><p>No</p></div></div></td></tr></tbody></table>

#### Output

<table><colgroup><col> <col></colgroup><tbody><tr><td><p><strong>Type</strong></p></td><td><p>Any</p></td></tr></tbody></table>

#### Configurations

- [Config](#config)

## Sources

### Data Fetcher

`<graphql-router:data-fetcher>`

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><div><div><p><code>Configuration</code></p></div></div></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The name of the configuration you use</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>Yes</p></div></div></td></tr><tr><td><div><div><p><code>Output MIME Type</code></p></div></div></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The MIME type of the payload that this operation outputs</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p><code>Output Encoding</code></p></div></div></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The encoding of the payload that this operation outputs</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p><code>Config Ref</code></p></div></div></td><td><div><div><p>ConfigurationProvider</p></div></div></td><td><div><div><p>The name of the configuration you use to execute this component</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>Yes</p></div></div></td></tr><tr><td><div><div><p><code>Primary Node Only</code></p></div></div></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Whether this source must only be executed on the primary node when running in a cluster</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p>Streaming Strategy</p></div></div></td><td><div><div><ul><li><p><a href="#repeatable-in-memory-stream">Repeatable In Memory Stream</a></p></li><li><p><a href="#repeatable-file-store-stream">Repeatable File Store Stream</a></p></li><li><p>Non-Repeatable Stream</p></li></ul></div></div></td><td><div><div><p>Configure repeatable streaming strategy</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p><code>Redelivery Policy</code></p></div></div></td><td><div><div><p><a href="#redelivery-policy">Redelivery Policy</a></p></div></div></td><td><div><div><p>Defines a policy for processing the redelivery of the same message</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p><code>Object Type Name</code></p></div></div></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The object-type name</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>Yes</p></div></div></td></tr><tr><td><div><div><p><code>Field Name</code></p></div></div></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The field name</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p><code>Body Content</code></p></div></div></td><td><div><div><p>Any</p></div></div></td><td><div><div><p>Content of the message (usually, the payload)</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr></tbody></table>

#### Output

<table><colgroup><col> <col></colgroup><tbody><tr><td><p><strong>Type</strong></p></td><td><p>Any</p></td></tr><tr><td><p><strong>Attributes Type</strong></p></td><td><p>* <a href="#data-fetcher-attributes">Data Fetcher Attributes</a></p></td></tr></tbody></table>

#### Configurations

- [Config](#config)

### Data Loader

`<graphql-router:data-loader>`

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><div><div><p><code>Configuration</code></p></div></div></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The name of the configuration you use</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>Yes</p></div></div></td></tr><tr><td><div><div><p><code>Object Type Name</code></p></div></div></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The object-type name</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>Yes</p></div></div></td></tr><tr><td><div><div><p><code>Config Ref</code></p></div></div></td><td><div><div><p>ConfigurationProvider</p></div></div></td><td><div><div><p>The name of the configuration you use to execute this component</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>Yes</p></div></div></td></tr><tr><td><div><div><p><code>Primary Node Only</code></p></div></div></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Whether this source should only be executed on the primary node when running in a cluster</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p><code>Redelivery Policy</code></p></div></div></td><td><div><div><p><a href="#redelivery-policy">Redelivery Policy</a></p></div></div></td><td><div><div><p>Defines a policy for processing the redelivery of the same message</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p><code>Body Content</code></p></div></div></td><td><div><div><p>Any</p></div></div></td><td><div><div><p>Content of the message (usually, the payload)</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr></tbody></table>

#### Output

<table><colgroup><col> <col></colgroup><tbody><tr><td><p><strong>Type</strong></p></td><td><p>Array of Any</p></td></tr></tbody></table>

#### Configurations

- [Config](#config)

## Types

### Data Fetcher Attributes

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><div><div><p><code>Alias</code></p></div></div></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Alias of the queried field</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p><code>Arguments</code></p></div></div></td><td><div><div><p>Object</p></div></div></td><td><div><div><p>Arguments of the queried field</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p><code>Selected Fields</code></p></div></div></td><td><div><div><p>Object</p></div></div></td><td><div><div><p>Map of subfields selected from this compound type</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p><code>Source</code></p></div></div></td><td><div><div><p>Any</p></div></div></td><td><div><div><p>Actual value of the fetched field parent</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr></tbody></table>

### Repeatable in Memory Stream

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><div><div><p><code>Initial Buffer Size</code></p></div></div></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>The amount of memory that is allocated to consume the stream and provide random access to it. If the stream contains more data than the buffer capacity, then it is expanded according to the <code>bufferSizeIncrement</code> attribute, with an upper limit of <code>maxInMemorySize</code>.</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p><code>Buffer Size Increment</code></p></div></div></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>How much buffer size expands if it exceeds its initial size. A value of zero or lower specifies that the buffer doesn’t expand. When the buffer is full, a <code>STREAM_MAXIMUM_SIZE_EXCEEDED</code> error occurs.</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p><code>Max Buffer Size</code></p></div></div></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>The maximum amount of memory used. If more is used, a <code>STREAM_MAXIMUM_SIZE_EXCEEDED</code> error is raised. A value lower or equal to zero means no limit.</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p>Buffer Unit</p></div></div></td><td><div><div><p>Enumeration, one of:</p></div><div><ul><li><p>BYTE</p></li><li><p>KB</p></li><li><p>MB</p></li><li><p>GB</p></li></ul></div></div></td><td><div><div><p>These attributes are expressed in this unit.</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr></tbody></table>

### Repeatable File Store Stream

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><div><div><p><code>In Memory Size</code></p></div></div></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Defines the maximum memory that the stream uses to keep data in memory. If it consumes more, the stream buffers the content on disk.</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p>Buffer Unit</p></div></div></td><td><div><div><p>Enumeration, one of:</p></div><div><ul><li><p>BYTE</p></li><li><p>KB</p></li><li><p>MB</p></li><li><p>GB</p></li></ul></div></div></td><td><div><div><p>The unit for expressing <code>maxInMemorySize</code></p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr></tbody></table>

### Redelivery Policy

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><div><div><p><code>Max Redelivery Count</code></p></div></div></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>The maximum number of times a message can be redelivered and processed unsuccessfully before triggering a "Process failed" message.</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p><code>Message Digest Algorithm</code></p></div></div></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The secure hashing algorithm to use. If not set, the default is SHA-256.</p></div></div></td><td><div><div><p>SHA-256</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p><code>Message Identifier</code></p></div></div></td><td><div><div><ul><li><p><a href="#redelivery-policy-message-identifier">Redelivery Policy Message Identifier</a></p></li></ul></div></div></td><td><div><div><p>The strategy to use to identify the messages</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p><code>Object Store</code></p></div></div></td><td><div><div><p>ObjectStore</p></div></div></td><td><div><div><p>The object store where the redelivery counter for each message is stored</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr></tbody></table>

### Redelivery Policy Message Identifier

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><div><div><p><code>Use Secure Hash</code></p></div></div></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Whether to use a secure hash algorithm to identify a redelivered message</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p><code>Id Expression</code></p></div></div></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Expressions to use to determine when a message has been redelivered. You can only set this property if useSecureHash is false.</p></div></div></td><td><div><div><p>None</p></div></div></td><td><div><div><p>No</p></div></div></td></tr></tbody></table>
