GraphQL API Reference

Welcome to the party!

Contact

API Support

support@example.com

API Endpoints
# Staging:
https://staging.example.com/graphql
# Production:
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

This is pretty dumb, but Query!
This is pretty dumb, but Query!
This is pretty dumb, but Query!
This is pretty dumb, but Query!
This is pretty dumb, but Query!
This is pretty dumb, but Query!
This is pretty dumb, but Query!
This is pretty dumb, but Query!
This is pretty dumb, but Query!
This is pretty dumb, but Query!
This is pretty dumb, but Query!
This is pretty dumb, but Query!

Types

AddressInput

Description

AddresInput description

Fields
Input Field Description
lat - String
lon - String
planet - String
Example
{
  "lat": "xyz789",
  "lon": "abc123",
  "planet": "abc123"
}

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 AddressInput would not be shown. Default = {planet: "Earth"}
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 enums. Markdown and reference interpolation like [String!]! are supported

Values
Enum Value Description

NEWHOPE

Who is Luke? Markdown and reference interpolation like [String!]! are supported NEWHOPE is going away

EMPIRE

Who is Darth?

JEDI

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. Markdown and reference interpolation like [String!]! are supported. Default = false
anotherField - String Comment for anotherField
episodeEnums - [EpisodeEnum!] Comment for episodeEnums. Default = [EMPIRE, JEDI]
episodeEnum - EpisodeEnum
Example
{
  "someField": true,
  "anotherField": "Metadata example of `anotherField`",
  "episodeEnums": ["EMPIRE"],
  "episodeEnum": "NEWHOPE"
}

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
{}

MyInterface

Description

A simple Interface

Fields
Field Name Description
id - String!
Possible Types
MyInterface Types

MyType

Example
{"id": "exampleFromMetadataJson"}

MyType

Description

Markdown and reference interpolation like [String!]! and myQuery and myMutation are supported

Fields
Field Name Description
id - String! I am an ID that will have my example value specified by the @spectaql directive
name - String!
url - URL
json - JSON
jso - JSONObject
vd - Void
byte - Byte
createdAt - DateTime
nonRequiredField - String Markdown and reference interpolation like [String!]! are supported
Arguments
nonRequiredArg - String

Markdown and reference interpolation like [String!]! are supported

reqArg - String!
reqArrayArg - [String]!
dblReqArrayArg - [String!]!
requiredField - String! requiredField is going away
episode - EpisodeEnum!
requiredArrayField - [String]!
doubleRequiredArrayField - [String!]!
Example
{
  "id": "idFromDirective",
  "name": "Generated Field example for name",
  "url": "https://work.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

SimpleTypeOne

Example
{"id": "abc123"}

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": "123", "myType": [{"id": "myTypeId", "name": "myTypeName"}]}

SimpleTypeTwo

Fields
Field Name Description
simpleTypeTwoFieldOne - String
simpleTypeTwoFieldTwo - String
Example
{"simpleTypeTwoFieldOne": "42", "simpleTypeTwoFieldTwo": "SomeIdValue"}

SimpleTypes

Description

A Union of SimpleTypeOne and SimpleTypeTwo. Markdown and reference interpolation like [String!]! are supported

Types
Union Types

SimpleTypeOne

SimpleTypeTwo

MyType

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
"https://work.com"

Void