GraphQL API
The GraphQL API resource allows tasks to connect to a GraphQL API; it typically embodies a base URL
as well as e.g. headers that should be included on HTTP requests. For a high-level introduction to
resources, see the resources page.
Creating a GraphQL API resource
To create a new GraphQL API resource, visit
resources for your team, click the "New" button,
and select the GraphQL API resource type. Enter your connection details in the form:

Name should be a human-readable name for your resource.
Base URL should be the singular endpoint of the GraphQL server you want to connect to. Typically
this is located at a
/graphql
endpoint.Any headers defined at the resource level will be included on all requests that use this
resource, unless they are overridden by the task or session block.
Private networking
To connect to a GraphQL API inside a private VPC, you can
self-host the agent and run the agent within your own VPC. Since tasks and
GraphQL requests run on agents, these tasks will run from within your network and be able to connect
to the API.
Field reference
When this resource is attached to a task, its fields
are available in the JSON environment variable
AIRPLANE_RESOURCES
under the alias it was attached
with. The available fields are documented below.idstring
The ID of the resource.
slugstring
The slug of the resource as defined in the resource settings page.
namestring
The name of the resource.
The kind of the resource.
baseURLstring
The base URL of the GraphQL API.
headersobject
Mapping of header name to value.
secretHeaderslist
List of header names that contain sensitive information.
authobject
The GraphQL auth configuration. Nullable.
auth.usernamestring
The username to use for basic authentication.
auth.passwordstring
The password to use for basic authentication.
auth.headersobject
Any headers specific to the authentication method.