GraphQL Resource
The GraphQL Resource provides an easy way to connect to a GraphQL API of your choosing.
Properties
Environment Profiles
| Prop | profiles | 
|---|---|
| Type | array | 
| Default | [ { 'baseURL': '', 'headers': [ { 'key': 'Content-Type', 'value': 'application/json' } ], 'method': 'POST', 'query': 'query { books { id, title } }', 'variables': '{}', 'healthcheckQuery': 'query { books { id, title } }', 'environment': '' } ] | 
The profiles configured for this resource in an environment
Environment Profile
| Prop | profiles[] | 
|---|---|
| Type | object | 
| Default | undefined | 
A profile of this resource for an environment
Base URL
| Prop | profiles[].baseURL | 
|---|---|
| Type | string | 
| Default | undefined | 
The base URL for the GraphQL API request.
Headers
| Prop | profiles[].headers | 
|---|---|
| Type | array | 
| Default | undefined | 
The header values to use for the GraphQL API request.
Header
| Prop | profiles[].headers[] | 
|---|---|
| Type | object | 
| Default | undefined | 
A key-value pair to attach to the headers of the request
Header key
| Prop | profiles[].headers[].key | 
|---|---|
| Type | string | 
| Default | undefined | 
The key of the header
Header value
| Prop | profiles[].headers[].value | 
|---|---|
| Type | string | 
| Default | undefined | 
The value of the specified header
Method
| Prop | profiles[].method | 
|---|---|
| Type | string | 
| Default | undefined | 
The GraphQL request methods.
Query
| Prop | profiles[].query | 
|---|---|
| Type | string | 
| Default | undefined | 
The content for the query.
Variables
| Prop | profiles[].variables | 
|---|---|
| Type | unknown | 
| Default | undefined | 
Variable values for the query.
Health-check Query
| Prop | profiles[].healthcheckQuery | 
|---|---|
| Type | string | 
| Default | undefined | 
Query for testing connection to server
Environment
| Prop | profiles[].environment | 
|---|---|
| Type | string | 
| Default | undefined | 
The name of the environment with which this profile is associated
Actions
Perform GraphQL request
Makes a GraphQL request over HTTP(S) to the specified API endpoint.
| Parameter | Type | Default | 
|---|---|---|
| query | string | query { __typename} | 
| variables | unknown | {} | 
| headers | array | [ { 'key': 'Content-Type', 'value': 'application/json' }] |