GraphQL API Reference
Welcome to the party!
Terms of Service
API Endpoints
https://example.com/graphql
Headers
// Your foo from bar
Authorization: Bearer <YOUR_TOKEN_HERE>
Important thing 1
Some important stuff we wanted you to know. Supports markdown
Queries
contactInfoInputQuery
Description
Without this Query, the ContactInfoInput
would not be shown
Response
Returns a
MyType
Arguments
Name | Description |
---|---|
input -
ContactInfoInput
|
Without this arg, the ContactInfoInput would not be shown |
Example
Query
query ContactInfoInputQuery($input: ContactInfoInput) {
contactInfoInputQuery(input: $input) {
url
json
jso
vd
byte
createdAt
nonRequiredField
requiredField
episode
requiredArrayField
doubleRequiredArrayField
}
}
Variables
{"input": ContactInfoInput}
Response
{
"data": {
"contactInfoInputQuery": {
"url": "http://www.test.com/",
"json": {},
"jso": {},
"vd": null,
"byte": [196, 189, 173, 171, 167, 163],
"createdAt": "2016-10-07T01:08:03.420Z",
"nonRequiredField": "Metadata example of `nonRequiredField`",
"requiredField": "Generated Field example for requiredField",
"episode": "NEWHOPE",
"requiredArrayField": ["Generated Field example for requiredArrayField"],
"doubleRequiredArrayField": [
"Generated Field example for doubleRequiredArrayField"
]
}
}
}
enumsQuery
Response
Returns a
String
Arguments
Name | Description |
---|---|
enums -
[EpisodeEnum!]!
|
Default = [EMPIRE, JEDI] |
enum -
EpisodeEnum!
|
enum defaults should get literalized. Default = EMPIRE |
ints -
[Int]
|
everything else should get JSON5.parsed. Default = [1, 2, 3] |
Example
Query
query EnumsQuery(
$enums: [EpisodeEnum!]!,
$enum: EpisodeEnum!,
$ints: [Int]
) {
enumsQuery(
enums: $enums,
enum: $enum,
ints: $ints
)
}
Variables
{"enums": ["EMPIRE", "JEDI"], "enum": "EMPIRE", "ints": [1, 2, 3]}
Response
{"data": {"enumsQuery": "abc123"}}
filterInputQuery
Description
Without this Query, the FilterInput
would not be shown
Response
Returns a
MyType
Arguments
Name | Description |
---|---|
filter -
FilterInput
|
Without this Query, the FilterInput would not be shown |
Example
Query
query FilterInputQuery($filter: FilterInput) {
filterInputQuery(filter: $filter) {
url
json
jso
vd
byte
createdAt
nonRequiredField
requiredField
episode
requiredArrayField
doubleRequiredArrayField
}
}
Variables
{"filter": FilterInput}
Response
{
"data": {
"filterInputQuery": {
"url": "http://www.test.com/",
"json": {},
"jso": {},
"vd": null,
"byte": [196, 189, 173, 171, 167, 163],
"createdAt": "2016-10-07T01:08:03.420Z",
"nonRequiredField": "Metadata example of `nonRequiredField`",
"requiredField": "Generated Field example for requiredField",
"episode": "NEWHOPE",
"requiredArrayField": ["Generated Field example for requiredArrayField"],
"doubleRequiredArrayField": [
"Generated Field example for doubleRequiredArrayField"
]
}
}
}
getInts
Response
Returns
[Int]
Example
Query
query GetInts {
getInts
}
Response
{"data": {"getInts": [42]}}
myQuery
myQuery
is going away Description
Markdown
and reference interpolation like
[String!]!
are supported
Response
Returns a
String
Arguments
Name | Description |
---|---|
nonReqQueryArg -
String
|
Markdown and reference interpolation like
[String!]! are supported. Default = "some default string" |
reqQueryArg -
String
|
|
reqQueryArrayArg -
[String]!
|
|
dblReqQueryArrayArg -
[String!]!
|
Example
Query
query MyQuery(
$nonReqQueryArg: String,
$reqQueryArg: String,
$reqQueryArrayArg: [String]!,
$dblReqQueryArrayArg: [String!]!
) {
myQuery(
nonReqQueryArg: $nonReqQueryArg,
reqQueryArg: $reqQueryArg,
reqQueryArrayArg: $reqQueryArrayArg,
dblReqQueryArrayArg: $dblReqQueryArrayArg
)
}
Variables
{
"nonReqQueryArg": "Metadata example of `nonReqQueryArg`",
"reqQueryArg": "Special generated Argument example for myQuery reqQueryArg",
"reqQueryArrayArg": [
"Special generated Argument example for myQuery reqQueryArrayArg"
],
"dblReqQueryArrayArg": [
"Special generated Argument example for myQuery dblReqQueryArrayArg"
]
}
Response
{"data": {"myQuery": "abc123"}}
myTypes
Response
Returns
[MyType]
Example
Query
query MyTypes {
myTypes {
url
json
jso
vd
byte
createdAt
nonRequiredField
requiredField
episode
requiredArrayField
doubleRequiredArrayField
}
}
Response
{
"data": {
"myTypes": {
"url": "http://www.test.com/",
"json": {},
"jso": {},
"vd": null,
"byte": [196, 189, 173, 171, 167, 163],
"createdAt": "2016-10-07T01:08:03.420Z",
"nonRequiredField": "Metadata example of `nonRequiredField`",
"requiredField": "Generated Field example for requiredField",
"episode": "NEWHOPE",
"requiredArrayField": ["Generated Field example for requiredArrayField"],
"doubleRequiredArrayField": [
"Generated Field example for doubleRequiredArrayField"
]
}
}
}
nodeQuery
optionalsQuery
Description
I'm the optionals query
Example
Query
query OptionalsQuery($optionalArg: [String]) {
optionalsQuery(optionalArg: $optionalArg)
}
Variables
{"optionalArg": ["Generated Argument example for optionalsQuery optionalArg"]}
Response
{"data": {"optionalsQuery": ["abc123"]}}
requiredsQuery
Response
Returns
[String!]!
Arguments
Name | Description |
---|---|
dblReqArg -
[String!]!
|
Example
Query
query RequiredsQuery($dblReqArg: [String!]!) {
requiredsQuery(dblReqArg: $dblReqArg)
}
Variables
{"dblReqArg": ["Generated Argument example for requiredsQuery dblReqArg"]}
Response
{"data": {"requiredsQuery": ["abc123"]}}
simpleTypes
Description
I return a list of the SimpleType Union
Response
Returns
[SimpleTypes]
Example
Query
query SimpleTypes {
simpleTypes
}
Response
{"data": {"simpleTypes": [SimpleTypeOne]}}
stringThing
Description
This Query has the same name as a Mutation
Response
Returns a
String
Example
Query
query StringThing {
stringThing
}
Response
{"data": {"stringThing": "xyz789"}}
Mutations
myMutation
Description
Markdown
and reference interpolation like
[String!]!
are supported
Response
Returns a
String
Arguments
Name | Description |
---|---|
nonReqMutationArg -
String
|
Markdown and reference interpolation like
[String!]! are supported. Default = "some default string" |
reqMutationArg -
String!
|
|
reqMutationArrayArg -
[String]!
|
|
dblReqMutationArrayArg -
[String!]!
|
Example
Query
mutation MyMutation(
$nonReqMutationArg: String,
$reqMutationArg: String!,
$reqMutationArrayArg: [String]!,
$dblReqMutationArrayArg: [String!]!
) {
myMutation(
nonReqMutationArg: $nonReqMutationArg,
reqMutationArg: $reqMutationArg,
reqMutationArrayArg: $reqMutationArrayArg,
dblReqMutationArrayArg: $dblReqMutationArrayArg
)
}
Variables
{
"nonReqMutationArg": "Generated Argument example for myMutation nonReqMutationArg",
"reqMutationArg": "Generated Argument example for myMutation reqMutationArg",
"reqMutationArrayArg": [
"Generated Argument example for myMutation reqMutationArrayArg"
],
"dblReqMutationArrayArg": [
"Generated Argument example for myMutation dblReqMutationArrayArg"
]
}
Response
{"data": {"myMutation": "abc123"}}
stringThing
Description
This Mutation has the same name as a Query
Types
AddressInput
Boolean
Description
The Boolean
scalar type represents true
or false
.
Example
true
Byte
Example
[196, 189, 173, 171, 167, 163]
ContactInfoInput
Description
ContactInfoInput description
Fields
Input Field | Description |
---|---|
email -
String
|
|
address -
AddressInput
|
Without this InputField, the |
phoneNumber -
PhoneNumber
|
Example
{
"email": "xyz789",
"address": AddressInput,
"phoneNumber": "+17895551234"
}
DateTime
Description
This is a DateTime
scalar
Example
"2016-10-07T01:08:03.420Z"
EpisodeEnum
Description
These are very important enum
s. Markdown
and reference interpolation like
[String!]!
are supported
Values
Enum Value | Description |
---|---|
|
Who is Luke? Markdown and reference interpolation like
[String!]! are supported
NEWHOPE is going away
|
|
Who is Darth? |
|
Who are the Ewoks? |
Example
"NEWHOPE"
FilterInput
Description
An Input Type for filtering things. Markdown
and reference interpolation like
[String!]!
are supported
Fields
Input Field | Description |
---|---|
someField -
Boolean
|
Comment for someField. |
anotherField -
String
|
Comment for anotherField |
episodeEnums -
[EpisodeEnum!]
|
Comment for episodeEnums |
Example
{
"someField": true,
"anotherField": "Metadata example of `anotherField`",
"episodeEnums": ["EMPIRE"]
}
ID
Description
The ID
scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4"
) or integer (such as 4
) input value will be accepted as an ID.
Example
4
Int
Description
The Int
scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
Example
42
JSON
Example
{}
JSONObject
Example
{}
MyType
Description
Markdown
and reference interpolation like
[String!]!
and
myQuery
and
myMutation
are supported
Fields
Field Name | Description |
---|---|
url -
URL
|
|
json -
JSON
|
|
jso -
JSONObject
|
|
vd -
Void
|
|
byte -
Byte
|
|
createdAt -
DateTime
|
|
nonRequiredField -
String
|
Markdown and reference interpolation like
[String!]! are supported |
Arguments
|
|
requiredField -
String!
|
requiredField is going away
|
episode -
EpisodeEnum!
|
|
requiredArrayField -
[String]!
|
|
doubleRequiredArrayField -
[String!]!
|
Example
{
"url": "http://www.test.com/",
"json": {},
"jso": {},
"vd": null,
"byte": [196, 189, 173, 171, 167, 163],
"createdAt": "2016-10-07T01:08:03.420Z",
"nonRequiredField": "Metadata example of `nonRequiredField`",
"requiredField": "Generated Field example for requiredField",
"episode": "NEWHOPE",
"requiredArrayField": ["Generated Field example for requiredArrayField"],
"doubleRequiredArrayField": [
"Generated Field example for doubleRequiredArrayField"
]
}
Node
Description
Anything with an ID can be a node
Fields
Field Name | Description |
---|---|
id -
String!
|
A unique identifier |
Possible Types
Node Types |
---|
Example
{"id": "xyz789"}
PhoneNumber
Description
This is a Phone
Example
"+17895551234"
SimpleTypeOne
Description
Markdown
and reference interpolation like
[String!]!
are supported
Fields
Field Name | Description |
---|---|
id -
String!
|
|
myType -
[MyType!]!
|
Markdown and reference interpolation like
[String!]! are supported |
Example
{
"id": "abc123",
"myType": [MyType]
}
SimpleTypeTwo
Fields
Field Name | Description |
---|---|
simpleTypeTwoField -
String
|
Example
{"simpleTypeTwoField": "abc123"}
SimpleTypes
Description
A Union of SimpleTypeOne
and SimpleTypeTwo
. Markdown
and reference interpolation like
[String!]!
are supported
Types
Union Types |
---|
Example
SimpleTypeOne
String
Description
The String
scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
Example
"xyz789"
URL
Example
"http://www.test.com/"
Void
Subscriptions
myTypeUpdatedSubscription
Description
The myTypeUpdatedSubscription
, baby!
Example
Query
subscription MyTypeUpdatedSubscription($input: ID) {
myTypeUpdatedSubscription(input: $input) {
url
json
jso
vd
byte
createdAt
nonRequiredField
requiredField
episode
requiredArrayField
doubleRequiredArrayField
}
}
Variables
{"input": 4}
Response
{
"data": {
"myTypeUpdatedSubscription": {
"url": "http://www.test.com/",
"json": {},
"jso": {},
"vd": null,
"byte": [196, 189, 173, 171, 167, 163],
"createdAt": "2016-10-07T01:08:03.420Z",
"nonRequiredField": "Metadata example of `nonRequiredField`",
"requiredField": "Generated Field example for requiredField",
"episode": "NEWHOPE",
"requiredArrayField": ["Generated Field example for requiredArrayField"],
"doubleRequiredArrayField": [
"Generated Field example for doubleRequiredArrayField"
]
}
}
}