# GraphQL API Reference

I'm a description with a reference to myQuery

##### API Endpoints

    https://example.com/graphql

## Content from file that supports markdown

I am Intro Items content that comes from a `markdown` file!

# 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) {
        id
        name
        url
        json
        jso
        vd
        byte
        createdAt
        nonRequiredField
        requiredField
        episode
        requiredArrayField
        doubleRequiredArrayField
      }
    }

##### Variables

    {"input": ContactInfoInput}

##### Response

    {
      "data": {
        "contactInfoInputQuery": {
          "id": "idFromDirective",
          "name": "abc123",
          "url": "https://work.com",
          "json": {},
          "jso": {},
          "vd": null,
          "byte": [196, 189, 173, 171, 167, 163],
          "createdAt": "2007-12-03T10:15:30Z",
          "nonRequiredField": "abc123",
          "requiredField": "xyz789",
          "episode": "NEWHOPE",
          "requiredArrayField": ["abc123"],
          "doubleRequiredArrayField": ["xyz789"]
        }
      }
    }

Queries

## `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"}}

Queries

## `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) {
        id
        name
        url
        json
        jso
        vd
        byte
        createdAt
        nonRequiredField
        requiredField
        episode
        requiredArrayField
        doubleRequiredArrayField
      }
    }

##### Variables

    {"filter": FilterInput}

##### Response

    {
      "data": {
        "filterInputQuery": {
          "id": "idFromDirective",
          "name": "abc123",
          "url": "https://work.com",
          "json": {},
          "jso": {},
          "vd": null,
          "byte": [196, 189, 173, 171, 167, 163],
          "createdAt": "2007-12-03T10:15:30Z",
          "nonRequiredField": "abc123",
          "requiredField": "xyz789",
          "episode": "NEWHOPE",
          "requiredArrayField": ["xyz789"],
          "doubleRequiredArrayField": ["abc123"]
        }
      }
    }

Queries

## `filterInputQueryWithDefault`

##### Response

Returns a `MyType`

##### Arguments

Name | Description
--- | ---
`filter` - `FilterInput` | Default = `{someField: true, episodeEnums: [EMPIRE, JEDI], episodeEnum: JEDI}`

#### Example

##### Query

    query FilterInputQueryWithDefault($filter: FilterInput) {
      filterInputQueryWithDefault(filter: $filter) {
        id
        name
        url
        json
        jso
        vd
        byte
        createdAt
        nonRequiredField
        requiredField
        episode
        requiredArrayField
        doubleRequiredArrayField
      }
    }

##### Variables

    {
      "filter": {
        "someField": "true",
        "episodeEnums": ["EMPIRE", "JEDI"],
        "episodeEnum": "JEDI"
      }
    }

##### Response

    {
      "data": {
        "filterInputQueryWithDefault": {
          "id": "idFromDirective",
          "name": "abc123",
          "url": "https://work.com",
          "json": {},
          "jso": {},
          "vd": null,
          "byte": [196, 189, 173, 171, 167, 163],
          "createdAt": "2007-12-03T10:15:30Z",
          "nonRequiredField": "xyz789",
          "requiredField": "xyz789",
          "episode": "NEWHOPE",
          "requiredArrayField": ["xyz789"],
          "doubleRequiredArrayField": ["xyz789"]
        }
      }
    }

Queries

## `getInts`

##### Response

Returns `[Int]`

#### Example

##### Query

    query GetInts {
      getInts
    }

##### Response

    {"data": {"getInts": [123]}}

Queries

## `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": "some default string",
      "reqQueryArg": "xyz789",
      "reqQueryArrayArg": ["xyz789"],
      "dblReqQueryArrayArg": ["xyz789"]
    }

##### Response

    {"data": {"myQuery": "abc123"}}

Queries

## `myTypes`

##### Response

Returns `[MyType]`

#### Example

##### Query

    query MyTypes {
      myTypes {
        id
        name
        url
        json
        jso
        vd
        byte
        createdAt
        nonRequiredField
        requiredField
        episode
        requiredArrayField
        doubleRequiredArrayField
      }
    }

##### Response

    {
      "data": {
        "myTypes": [
          {
            "id": "idFromDirective",
            "name": "abc123",
            "url": "https://work.com",
            "json": {},
            "jso": {},
            "vd": null,
            "byte": [196, 189, 173, 171, 167, 163],
            "createdAt": "2007-12-03T10:15:30Z",
            "nonRequiredField": "xyz789",
            "requiredField": "xyz789",
            "episode": "NEWHOPE",
            "requiredArrayField": ["xyz789"],
            "doubleRequiredArrayField": [
              "abc123"
            ]
          }
        ]
      }
    }

Queries

## `nodeQuery`

##### Response

Returns a `Node`

##### Arguments

Name | Description
--- | ---
`id` - `String!` |

#### Example

##### Query

    query NodeQuery($id: String!) {
      nodeQuery(id: $id) {
        id
      }
    }

##### Variables

    {"id": "xyz789"}

##### Response

    {"data": {"nodeQuery": {"id": "xyz789"}}}

Queries

## `optionalsQuery`

##### Description

I'm the optionals query

##### Response

Returns `[String]`

##### Arguments

Name | Description
--- | ---
`optionalArg` - `[String]` |

#### Example

##### Query

    query OptionalsQuery($optionalArg: [String]) {
      optionalsQuery(optionalArg: $optionalArg)
    }

##### Variables

    {"optionalArg": ["xyz789"]}

##### Response

    {"data": {"optionalsQuery": ["xyz789"]}}

Queries

## `requiredsQuery`

##### Response

Returns `[String!]!`

##### Arguments

Name | Description
--- | ---
`dblReqArg` - `[String!]!` |

#### Example

##### Query

    query RequiredsQuery($dblReqArg: [String!]!) {
      requiredsQuery(dblReqArg: $dblReqArg)
    }

##### Variables

    {"dblReqArg": ["xyz789"]}

##### Response

    {"data": {"requiredsQuery": ["xyz789"]}}

Queries

## `secrets`

##### Description

This will be removed due to SecretType being removed

##### Response

Returns `[SecretType]`

#### Example

##### Query

    query Secrets {
      secrets {
        secret
      }
    }

##### Response

    {
      "data": {
        "secrets": [{"secret": "abc123"}]
      }
    }

Queries

## `simpleTypes`

##### Description

I return a list of the SimpleType Union

##### Response

Returns `[SimpleTypes]`

#### Example

##### Query

    query SimpleTypes {
      simpleTypes {
        ... on SimpleTypeOne {
          ...SimpleTypeOneFragment
        }
        ... on SimpleTypeTwo {
          ...SimpleTypeTwoFragment
        }
        ... on MyType {
          ...MyTypeFragment
        }
      }
    }

##### Response

    {"data": {"simpleTypes": [SimpleTypeOne]}}

Queries

## `stringThing`

##### Description

This Query has the same name as a Mutation

##### Response

Returns a `String`

#### Example

##### Query

    query StringThing {
      stringThing
    }

##### Response

    {"data": {"stringThing": "abc123"}}

# 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": "some default string",
      "reqMutationArg": "xyz789",
      "reqMutationArrayArg": ["abc123"],
      "dblReqMutationArrayArg": ["abc123"]
    }

##### Response

    {"data": {"myMutation": "xyz789"}}

Mutations

## `stringThing`

##### Description

This Mutation has the same name as a Query

##### Response

Returns a `String`

##### Arguments

Name | Description
--- | ---
`anArgument` - `String` |

#### Example

##### Query

    mutation StringThing($anArgument: String) {
      stringThing(anArgument: $anArgument)
    }

##### Variables

    {"anArgument": "xyz789"}

##### Response

    {"data": {"stringThing": "xyz789"}}

# Subscriptions

## `myTypeUpdatedSubscription`

##### Description

The `myTypeUpdatedSubscription`, baby!

##### Response

Returns a `MyType!`

##### Arguments

Name | Description
--- | ---
`input` - `ID` |

#### Example

##### Query

    subscription MyTypeUpdatedSubscription($input: ID) {
      myTypeUpdatedSubscription(input: $input) {
        id
        name
        url
        json
        jso
        vd
        byte
        createdAt
        nonRequiredField
        requiredField
        episode
        requiredArrayField
        doubleRequiredArrayField
      }
    }

##### Variables

    {"input": "4"}

##### Response

    {
      "data": {
        "myTypeUpdatedSubscription": {
          "id": "idFromDirective",
          "name": "abc123",
          "url": "https://work.com",
          "json": {},
          "jso": {},
          "vd": null,
          "byte": [196, 189, 173, 171, 167, 163],
          "createdAt": "2007-12-03T10:15:30Z",
          "nonRequiredField": "abc123",
          "requiredField": "abc123",
          "episode": "NEWHOPE",
          "requiredArrayField": ["abc123"],
          "doubleRequiredArrayField": ["xyz789"]
        }
      }
    }

Subscriptions

## `secretTypeSubscription`

##### Description

A subscription that will probably be removed when `SecretType` is removed

##### Response

Returns a `SecretType!`

#### Example

##### Query

    subscription SecretTypeSubscription {
      secretTypeSubscription {
        secret
      }
    }

##### Response

    {
      "data": {
        "secretTypeSubscription": {
          "secret": "xyz789"
        }
      }
    }

# Types

## AddressInput

##### Description

AddresInput description

##### Fields

Input Field | Description
--- | ---
`lat` - `String` |
`lon` - `String` |
`planet` - `String` |

##### Example

    {
      "lat": "xyz789",
      "lon": "abc123",
      "planet": "abc123"
    }

Types

## Boolean

##### Description

The `Boolean` scalar type represents `true` or `false`.

Types

## Byte

##### Example

    [196, 189, 173, 171, 167, 163]

Types

## 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": "abc123",
      "address": AddressInput,
      "phoneNumber": "+17895551234"
    }

Types

## DateTime

##### Description

This is a `DateTime` scalar

##### Example

    "2007-12-03T10:15:30Z"

Types

## EpisodeEnum

##### Description

These are very important `enum`s. `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"

Types

## 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` `someField` is going away
`anotherField` - `String` | Comment for anotherField
`episodeEnums` - `[EpisodeEnum!]` | Comment for episodeEnums. Default = `[EMPIRE, JEDI]`
`episodeEnum` - `EpisodeEnum` |

##### Example

    {
      "someField": true,
      "anotherField": "abc123",
      "episodeEnums": ["NEWHOPE"],
      "episodeEnum": "NEWHOPE"
    }

Types

## 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"

Types

## 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

    123

Types

## JSON

##### Example

    {}

Types

## JSONObject

##### Example

    {}

Types

## MyInterface

##### Description

A simple Interface

##### Fields

Field Name | Description
--- | ---
`id` - `String!` |
`name` - `String!` |

##### Possible Types

MyInterface Types
`MyType`

##### Example

    {
      "id": "abc123",
      "name": "xyz789"
    }

Types

## 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": "abc123",
      "url": "https://work.com",
      "json": {},
      "jso": {},
      "vd": null,
      "byte": [196, 189, 173, 171, 167, 163],
      "createdAt": "2007-12-03T10:15:30Z",
      "nonRequiredField": "xyz789",
      "requiredField": "abc123",
      "episode": "NEWHOPE",
      "requiredArrayField": ["xyz789"],
      "doubleRequiredArrayField": ["xyz789"]
    }

Types

## 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": "xyz789"}

Types

## PhoneNumber

##### Description

This is a Phone

##### Example

    "+17895551234"

Types

## SecretType

##### Description

This is a type that should probably be undocumented. Metadata will indicate this should be hidden

##### Fields

Field Name | Description
--- | ---
`secret` - `String!` |

##### Example

    {"secret": "abc123"}

Types

## 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"}]}

Types

## SimpleTypeTwo

##### Fields

Field Name | Description
--- | ---
`simpleTypeTwoFieldOne` - `String` |
`simpleTypeTwoFieldTwo` - `String` |

##### Example

    {"simpleTypeTwoFieldOne": "24", "simpleTypeTwoFieldTwo": "SomeIdValue"}

Types

## SimpleTypes

##### Description

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

##### Types

Union Types
`SimpleTypeOne`
`SimpleTypeTwo`
`MyType`

##### Example

    SimpleTypeOne

Types

## 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"

Types

## URL

##### Example

    "https://work.com"

Types

## Void

Documentation by Anvil SpectaQL