import { ApiSignature, ApiType } from '../../components/ApiCode';

Create and inspect GraphQL type definitions and schemas.

These exports are also available from the root `graphql` package.

For documentation purposes, these exports are grouped into the following categories:

- [Paths](/api-v16/type#category-paths)
- [Names](/api-v16/type#category-names)
- [Types](/api-v16/type#category-types)
- [Directives](/api-v16/type#category-directives)
- [Introspection](/api-v16/type#category-introspection)
- [Scalars](/api-v16/type#category-scalars)
- [Schema](/api-v16/type#category-schema)
- [Validation](/api-v16/type#category-validation)

## Category: Paths

<div className="api-category-toc">
  <p>
    <strong>Types:</strong><br />
    <a href="/api-v16/type#responsepath">ResponsePath</a>
  </p>
</div>

### Types

#### ResponsePath

**Interface.** Represents a linked response path from a field back to the root response.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Members</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>prev</td>
      <td><ApiType parts={[["link", "Path", "/api-v16/type#responsepath"], " \u007c ", ["keyword", "undefined"]]} /></td>
      <td>The previous segment in the linked response path, or undefined at the root.</td>
    </tr>
    <tr>
      <td>key</td>
      <td><ApiType parts={[["keyword", "string"], " \u007c ", ["keyword", "number"]]} /></td>
      <td>The field name or list index for this response path segment.</td>
    </tr>
    <tr>
      <td>typename</td>
      <td><ApiType parts={[["keyword", "string"], " \u007c ", ["keyword", "undefined"]]} /></td>
      <td>The runtime object type name associated with this path segment, if known.</td>
    </tr>
  </tbody>
</table>

## Category: Names

<div className="api-category-toc">
  <p>
    <strong>Functions:</strong><br />
    <a href="/api-v16/type#assertname">assertName()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#assertenumvaluename">assertEnumValueName()</a>
  </p>
</div>

### Functions

#### assertName()

Upholds the spec rules about naming.

**Signature:**

<ApiSignature parts={[["name", "assertName"], "(", ["parameter", "name"], ": ", ["keyword", "string"], "): ", ["keyword", "string"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>name</td>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The GraphQL name to validate.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The validated GraphQL name.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { assertName } from 'graphql/type';

assertName('User'); // => 'User'
assertName('123User'); // throws an error
```

<hr className="api-item-divider" />

#### assertEnumValueName()

Upholds the spec rules about naming enum values.

**Signature:**

<ApiSignature parts={[["name", "assertEnumValueName"], "(", ["parameter", "name"], ": ", ["keyword", "string"], "): ", ["keyword", "string"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>name</td>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The GraphQL name to validate.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The validated GraphQL name.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { assertEnumValueName } from 'graphql/type';

assertEnumValueName('ACTIVE'); // => 'ACTIVE'
assertEnumValueName('true'); // throws an error
```

## Category: Types

<div className="api-category-toc">
  <p>
    <strong>Classes:</strong><br />
    <a href="/api-v16/type#graphqllist">GraphQLList</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlnonnull">GraphQLNonNull</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlscalartype">GraphQLScalarType</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlobjecttype">GraphQLObjectType</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlinterfacetype">GraphQLInterfaceType</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqluniontype">GraphQLUnionType</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlenumtype">GraphQLEnumType</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlinputobjecttype">GraphQLInputObjectType</a>
  </p>
  <p>
    <strong>Functions:</strong><br />
    <a href="/api-v16/type#istype">isType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#asserttype">assertType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#isscalartype">isScalarType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#assertscalartype">assertScalarType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#isobjecttype">isObjectType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#assertobjecttype">assertObjectType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#isinterfacetype">isInterfaceType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#assertinterfacetype">assertInterfaceType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#isuniontype">isUnionType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#assertuniontype">assertUnionType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#isenumtype">isEnumType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#assertenumtype">assertEnumType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#isinputobjecttype">isInputObjectType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#assertinputobjecttype">assertInputObjectType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#assertlisttype">assertListType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#assertnonnulltype">assertNonNullType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#isinputtype">isInputType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#assertinputtype">assertInputType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#isoutputtype">isOutputType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#assertoutputtype">assertOutputType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#isleaftype">isLeafType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#assertleaftype">assertLeafType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#iscompositetype">isCompositeType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#assertcompositetype">assertCompositeType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#isabstracttype">isAbstractType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#assertabstracttype">assertAbstractType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#iswrappingtype">isWrappingType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#assertwrappingtype">assertWrappingType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#isnullabletype">isNullableType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#assertnullabletype">assertNullableType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#isnamedtype">isNamedType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#assertnamedtype">assertNamedType()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#resolvereadonlyarraythunk">resolveReadonlyArrayThunk()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#resolveobjmapthunk">resolveObjMapThunk()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#isrequiredargument">isRequiredArgument()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#isrequiredinputfield">isRequiredInputField()</a>
  </p>
  <p>
    <strong>Types:</strong><br />
    <a href="/api-v16/type#graphqltype">GraphQLType</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlinputtype">GraphQLInputType</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqloutputtype">GraphQLOutputType</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlleaftype">GraphQLLeafType</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlcompositetype">GraphQLCompositeType</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlabstracttype">GraphQLAbstractType</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlwrappingtype">GraphQLWrappingType</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlnullabletype">GraphQLNullableType</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlnamedtype">GraphQLNamedType</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlnamedinputtype">GraphQLNamedInputType</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlnamedoutputtype">GraphQLNamedOutputType</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#thunkreadonlyarray">ThunkReadonlyArray</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#thunkobjmap">ThunkObjMap</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlscalartypeextensions">GraphQLScalarTypeExtensions</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlscalarserializer">GraphQLScalarSerializer</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlscalarvalueparser">GraphQLScalarValueParser</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlscalarliteralparser">GraphQLScalarLiteralParser</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlscalartypeconfig">GraphQLScalarTypeConfig</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlobjecttypeextensions">GraphQLObjectTypeExtensions</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlobjecttypeconfig">GraphQLObjectTypeConfig</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqltyperesolver">GraphQLTypeResolver</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlistypeoffn">GraphQLIsTypeOfFn</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlfieldresolver">GraphQLFieldResolver</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlresolveinfo">GraphQLResolveInfo</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlfieldextensions">GraphQLFieldExtensions</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlfieldconfig">GraphQLFieldConfig</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlfieldconfigargumentmap">GraphQLFieldConfigArgumentMap</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlargumentextensions">GraphQLArgumentExtensions</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlargumentconfig">GraphQLArgumentConfig</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlfieldconfigmap">GraphQLFieldConfigMap</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlfield">GraphQLField</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlargument">GraphQLArgument</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlfieldmap">GraphQLFieldMap</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlinterfacetypeextensions">GraphQLInterfaceTypeExtensions</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlinterfacetypeconfig">GraphQLInterfaceTypeConfig</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqluniontypeextensions">GraphQLUnionTypeExtensions</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqluniontypeconfig">GraphQLUnionTypeConfig</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlenumtypeextensions">GraphQLEnumTypeExtensions</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlenumtypeconfig">GraphQLEnumTypeConfig</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlenumvalueconfigmap">GraphQLEnumValueConfigMap</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlenumvalueextensions">GraphQLEnumValueExtensions</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlenumvalueconfig">GraphQLEnumValueConfig</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlenumvalue">GraphQLEnumValue</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlinputobjecttypeextensions">GraphQLInputObjectTypeExtensions</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlinputobjecttypeconfig">GraphQLInputObjectTypeConfig</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlinputfieldextensions">GraphQLInputFieldExtensions</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlinputfieldconfig">GraphQLInputFieldConfig</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlinputfieldconfigmap">GraphQLInputFieldConfigMap</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlinputfield">GraphQLInputField</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlinputfieldmap">GraphQLInputFieldMap</a>
  </p>
</div>

### Classes

#### GraphQLList

List Type Wrapper

A list is a wrapping type which points to another type.
Lists are often created within the context of defining the fields of
an object type.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type Parameters</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Constraint</th>
      <th>Default</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>T</td>
      <td><ApiType parts={[["link", "GraphQLType", "/api-v16/type#graphqltype"]]} /></td>
      <td></td>
      <td>The GraphQL type wrapped by this list type.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
const PersonType = new GraphQLObjectType({
  name: 'Person',
  fields: () => ({
    parents: { type: new GraphQLList(PersonType) },
    children: { type: new GraphQLList(PersonType) },
  })
})
```

<hr className="api-subsection-divider" />

##### Constructor

Creates a GraphQLList instance.

**Signature:**

<ApiSignature parts={[["keyword", "new"], " ", ["name", "GraphQLList"], "(", ["parameter", "ofType"], ": ", ["type", "T"], ");"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>ofType</td>
      <td><ApiType parts={[["type", "T"]]} /></td>
      <td>The type to wrap.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

##### Members

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>ofType</td>
      <td><ApiType parts={[["type", "T"]]} /></td>
      <td>The type wrapped by this list or non-null type.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

##### toString()

Returns this wrapping type as a GraphQL type-reference string.

**Signature:**

<ApiSignature parts={[["name", "toString"], "(): ", ["keyword", "string"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The GraphQL type-reference string.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { GraphQLList, GraphQLNonNull, GraphQLString } from 'graphql/type';

const stringList = new GraphQLList(GraphQLString);
const requiredStringList = new GraphQLList(new GraphQLNonNull(GraphQLString));

stringList.toString(); // => '[String]'
requiredStringList.toString(); // => '[String!]'
```

<hr className="api-subsection-divider" />

##### toJSON()

Returns the JSON representation used when this object is serialized.

**Signature:**

<ApiSignature parts={[["name", "toJSON"], "(): ", ["keyword", "string"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The JSON-serializable representation.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { GraphQLList, GraphQLString } from 'graphql/type';

const stringList = new GraphQLList(GraphQLString);

stringList.toJSON(); // => '[String]'
JSON.stringify({ type: stringList }); // => '{"type":"[String]"}'
```

<hr className="api-item-divider" />

#### GraphQLNonNull

Non-Null Type Wrapper

A non-null is a wrapping type which points to another type.
Non-null types enforce that their values are never null and can ensure
an error is raised if this ever occurs during a request. It is useful for
fields which you can make a strong guarantee on non-nullability, for example
usually the id field of a database row will never be null.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type Parameters</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Constraint</th>
      <th>Default</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>T</td>
      <td><ApiType parts={[["link", "GraphQLNullableType", "/api-v16/type#graphqlnullabletype"]]} /></td>
      <td></td>
      <td>The nullable GraphQL type wrapped by this non-null type.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
const RowType = new GraphQLObjectType({
  name: 'Row',
  fields: () => ({
    id: { type: new GraphQLNonNull(GraphQLString) },
  })
})
```

Note: the enforcement of non-nullability occurs within the executor.

<hr className="api-subsection-divider" />

##### Constructor

Creates a GraphQLNonNull instance.

**Signature:**

<ApiSignature parts={[["keyword", "new"], " ", ["name", "GraphQLNonNull"], "(", ["parameter", "ofType"], ": ", ["type", "T"], ");"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>ofType</td>
      <td><ApiType parts={[["type", "T"]]} /></td>
      <td>The type to wrap.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

##### Members

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>ofType</td>
      <td><ApiType parts={[["type", "T"]]} /></td>
      <td>The type wrapped by this list or non-null type.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

##### toString()

Returns this wrapping type as a GraphQL type-reference string.

**Signature:**

<ApiSignature parts={[["name", "toString"], "(): ", ["keyword", "string"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The GraphQL type-reference string.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { GraphQLList, GraphQLNonNull, GraphQLString } from 'graphql/type';

const requiredString = new GraphQLNonNull(GraphQLString);
const requiredStringList = new GraphQLNonNull(
  new GraphQLList(GraphQLString),
);

requiredString.toString(); // => 'String!'
requiredStringList.toString(); // => '[String]!'
```

<hr className="api-subsection-divider" />

##### toJSON()

Returns the JSON representation used when this object is serialized.

**Signature:**

<ApiSignature parts={[["name", "toJSON"], "(): ", ["keyword", "string"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The JSON-serializable representation.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { GraphQLNonNull, GraphQLString } from 'graphql/type';

const requiredString = new GraphQLNonNull(GraphQLString);

requiredString.toJSON(); // => 'String!'
JSON.stringify({ type: requiredString }); // => '{"type":"String!"}'
```

<hr className="api-item-divider" />

#### GraphQLScalarType

Scalar Type Definition

Scalar types define the leaf values of a GraphQL response and the input
values accepted by arguments and input object fields. A scalar type has a
name and coercion functions that validate and convert runtime values and
GraphQL literals.

If a type's serialize function returns `null` or does not return a value
(i.e. it returns `undefined`) then an error will be raised and a `null`
value will be returned in the response. Prefer validating inputs before
execution so clients receive input diagnostics before result coercion fails.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type Parameters</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Constraint</th>
      <th>Default</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>TInternal</td>
      <td></td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The internal runtime representation accepted by this scalar.</td>
    </tr>
    <tr>
      <td>TExternal</td>
      <td></td>
      <td><ApiType parts={[["type", "TInternal"]]} /></td>
      <td>The serialized representation exposed in GraphQL results.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
const OddType = new GraphQLScalarType({
  name: 'Odd',
  serialize: (value) => {
    if (!Number.isFinite(value)) {
      throw new Error(
        `Scalar "Odd" cannot represent "${value}" since it is not a finite number.`,
      );
    }

    if (value % 2 === 0) {
      throw new Error(`Scalar "Odd" cannot represent "${value}" since it is even.`);
    }
    return value;
  }
});
```

<hr className="api-subsection-divider" />

##### Constructor

Creates a GraphQLScalarType instance.

**Signature:**

<ApiSignature parts={[["keyword", "new"], " ", ["name", "GraphQLScalarType"], "(\n  ", ["parameter", "config"], ": ", ["type", "Readonly"], "\u003c\n    ", ["link", "GraphQLScalarTypeConfig", "/api-v16/type#graphqlscalartypeconfig"], "\u003c", ["type", "TInternal"], ", ", ["type", "TExternal"], "\u003e\n  \u003e,\n);"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>config</td>
      <td><ApiType parts={[["type", "Readonly"], "\u003c\n  ", ["link", "GraphQLScalarTypeConfig", "/api-v16/type#graphqlscalartypeconfig"], "\u003c", ["type", "TInternal"], ", ", ["type", "TExternal"], "\u003e\n\u003e"]} /></td>
      <td>Configuration describing this object.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

##### Members

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>name</td>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The GraphQL name for this schema element.</td>
    </tr>
    <tr>
      <td>description</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Human-readable description for this schema element, if provided.</td>
    </tr>
    <tr>
      <td>specifiedByURL</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>URL identifying the behavior specified for this custom scalar.</td>
    </tr>
    <tr>
      <td>serialize</td>
      <td><ApiType parts={[["link", "GraphQLScalarSerializer", "/api-v16/type#graphqlscalarserializer"], "\u003c", ["type", "TExternal"], "\u003e"]} /></td>
      <td>Function that converts internal values to externally visible scalar values.</td>
    </tr>
    <tr>
      <td>parseValue</td>
      <td><ApiType parts={[["link", "GraphQLScalarValueParser", "/api-v16/type#graphqlscalarvalueparser"], "\u003c", ["type", "TInternal"], "\u003e"]} /></td>
      <td>Function that converts variable input into this scalar's internal value.</td>
    </tr>
    <tr>
      <td>parseLiteral</td>
      <td><ApiType parts={[["link", "GraphQLScalarLiteralParser", "/api-v16/type#graphqlscalarliteralparser"], "\u003c", ["type", "TInternal"], "\u003e"]} /></td>
      <td>Function that converts AST input literals into this scalar's internal value.</td>
    </tr>
    <tr>
      <td>extensions</td>
      <td><ApiType parts={[["type", "Readonly"], "\u003c", ["link", "GraphQLScalarTypeExtensions", "/api-v16/type#graphqlscalartypeextensions"], "\u003e"]} /></td>
      <td>Extension fields to include in the formatted result.</td>
    </tr>
    <tr>
      <td>astNode</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "ScalarTypeDefinitionNode", "/api-v16/language#scalartypedefinitionnode"], "\u003e"]} /></td>
      <td>AST node from which this schema element was built, if available.</td>
    </tr>
    <tr>
      <td>extensionASTNodes</td>
      <td><ApiType parts={[["keyword", "readonly"], " ", ["link", "ScalarTypeExtensionNode", "/api-v16/language#scalartypeextensionnode"], "[]"]} /></td>
      <td>AST extension nodes applied to this schema element.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

##### toConfig()

Returns a normalized configuration object for this object.

**Signature:**

<ApiSignature parts={[["name", "toConfig"], "(): \u007b\n  ", ["property", "serialize"], ": ", ["link", "GraphQLScalarSerializer", "/api-v16/type#graphqlscalarserializer"], "\u003c", ["type", "TExternal"], "\u003e;\n  ", ["property", "parseValue"], ": ", ["link", "GraphQLScalarValueParser", "/api-v16/type#graphqlscalarvalueparser"], "\u003c", ["type", "TInternal"], "\u003e;\n  ", ["property", "parseLiteral"], ": ", ["link", "GraphQLScalarLiteralParser", "/api-v16/type#graphqlscalarliteralparser"], "\u003c", ["type", "TInternal"], "\u003e;\n  ", ["property", "extensions"], ": ", ["type", "Readonly"], "\u003c", ["link", "GraphQLScalarTypeExtensions", "/api-v16/type#graphqlscalartypeextensions"], "\u003e;\n  ", ["property", "extensionASTNodes"], ": ", ["type", "ReadonlyArray"], "\u003c", ["link", "ScalarTypeExtensionNode", "/api-v16/language#scalartypeextensionnode"], "\u003e;\n\u007d;"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={["\u007b\n  ", ["property", "serialize"], ": ", ["link", "GraphQLScalarSerializer", "/api-v16/type#graphqlscalarserializer"], "\u003c", ["type", "TExternal"], "\u003e;\n  ", ["property", "parseValue"], ": ", ["link", "GraphQLScalarValueParser", "/api-v16/type#graphqlscalarvalueparser"], "\u003c", ["type", "TInternal"], "\u003e;\n  ", ["property", "parseLiteral"], ": ", ["link", "GraphQLScalarLiteralParser", "/api-v16/type#graphqlscalarliteralparser"], "\u003c", ["type", "TInternal"], "\u003e;\n  ", ["property", "extensions"], ": ", ["type", "Readonly"], "\u003c", ["link", "GraphQLScalarTypeExtensions", "/api-v16/type#graphqlscalartypeextensions"], "\u003e;\n  ", ["property", "extensionASTNodes"], ": ", ["type", "ReadonlyArray"], "\u003c", ["link", "ScalarTypeExtensionNode", "/api-v16/language#scalartypeextensionnode"], "\u003e;\n\u007d"]} /></td>
      <td>A configuration object that can be used to recreate this object.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { GraphQLScalarType } from 'graphql/type';

const Url = new GraphQLScalarType({
  name: 'Url',
  description: 'An absolute URL string.',
  specifiedByURL: 'https://url.spec.whatwg.org/',
});

const config = Url.toConfig();
const UrlCopy = new GraphQLScalarType(config);

config.name; // => 'Url'
config.specifiedByURL; // => 'https://url.spec.whatwg.org/'
UrlCopy.name; // => Url.name
```

<hr className="api-subsection-divider" />

##### toString()

Returns the schema coordinate identifying this scalar type.

**Signature:**

<ApiSignature parts={[["name", "toString"], "(): ", ["keyword", "string"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The schema coordinate for this scalar type.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { GraphQLScalarType } from 'graphql/type';

const DateTime = new GraphQLScalarType({ name: 'DateTime' });

DateTime.toString(); // => 'DateTime'
String(DateTime); // => 'DateTime'
```

<hr className="api-subsection-divider" />

##### toJSON()

Returns the JSON representation used when this object is serialized.

**Signature:**

<ApiSignature parts={[["name", "toJSON"], "(): ", ["keyword", "string"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The JSON-serializable representation.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { GraphQLScalarType } from 'graphql/type';

const DateTime = new GraphQLScalarType({ name: 'DateTime' });

DateTime.toJSON(); // => 'DateTime'
JSON.stringify({ type: DateTime }); // => '{"type":"DateTime"}'
```

<hr className="api-item-divider" />

#### GraphQLObjectType

Object Type Definition

Almost all of the GraphQL types you define will be object types. Object types
have a name, but most importantly describe their fields.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type Parameters</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Constraint</th>
      <th>Default</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>TSource</td>
      <td></td>
      <td><ApiType parts={[["keyword", "any"]]} /></td>
      <td>Source object type passed to resolvers.</td>
    </tr>
    <tr>
      <td>TContext</td>
      <td></td>
      <td><ApiType parts={[["keyword", "any"]]} /></td>
      <td>Context object type passed to resolvers.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example 1</div>

```ts
const AddressType = new GraphQLObjectType({
  name: 'Address',
  fields: {
    street: { type: GraphQLString },
    number: { type: GraphQLInt },
    formatted: {
      type: GraphQLString,
      resolve: (obj) => {
        return obj.number + ' ' + obj.street
      }
    }
  }
});
```

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example 2</div>

When two types need to refer to each other, or a type needs to refer to
itself in a field, you can use a function expression (aka a closure or a
thunk) to supply the fields lazily.

```ts
const PersonType = new GraphQLObjectType({
  name: 'Person',
  fields: () => ({
    name: { type: GraphQLString },
    bestFriend: { type: PersonType },
  })
});
```

<hr className="api-subsection-divider" />

##### Constructor

Creates a GraphQLObjectType instance.

**Signature:**

<ApiSignature parts={[["keyword", "new"], " ", ["name", "GraphQLObjectType"], "(\n  ", ["parameter", "config"], ": ", ["type", "Readonly"], "\u003c\n    ", ["link", "GraphQLObjectTypeConfig", "/api-v16/type#graphqlobjecttypeconfig"], "\u003c", ["type", "TSource"], ", ", ["type", "TContext"], "\u003e\n  \u003e,\n);"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>config</td>
      <td><ApiType parts={[["type", "Readonly"], "\u003c\n  ", ["link", "GraphQLObjectTypeConfig", "/api-v16/type#graphqlobjecttypeconfig"], "\u003c", ["type", "TSource"], ", ", ["type", "TContext"], "\u003e\n\u003e"]} /></td>
      <td>Configuration describing this object.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

##### Members

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>name</td>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The GraphQL name for this schema element.</td>
    </tr>
    <tr>
      <td>description</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Human-readable description for this schema element, if provided.</td>
    </tr>
    <tr>
      <td>isTypeOf</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c\n  ", ["link", "GraphQLIsTypeOfFn", "/api-v16/type#graphqlistypeoffn"], "\u003c", ["type", "TSource"], ", ", ["type", "TContext"], "\u003e\n\u003e"]} /></td>
      <td>Predicate used to determine whether a runtime value belongs to this object type.</td>
    </tr>
    <tr>
      <td>extensions</td>
      <td><ApiType parts={[["type", "Readonly"], "\u003c\n  ", ["link", "GraphQLObjectTypeExtensions", "/api-v16/type#graphqlobjecttypeextensions"], "\u003c", ["type", "TSource"], ", ", ["type", "TContext"], "\u003e\n\u003e"]} /></td>
      <td>Extension fields to include in the formatted result.</td>
    </tr>
    <tr>
      <td>astNode</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "ObjectTypeDefinitionNode", "/api-v16/language#objecttypedefinitionnode"], "\u003e"]} /></td>
      <td>AST node from which this schema element was built, if available.</td>
    </tr>
    <tr>
      <td>extensionASTNodes</td>
      <td><ApiType parts={[["keyword", "readonly"], " ", ["link", "ObjectTypeExtensionNode", "/api-v16/language#objecttypeextensionnode"], "[]"]} /></td>
      <td>AST extension nodes applied to this schema element.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

##### getFields()

Returns the fields defined by this type.

**Signature:**

<ApiSignature parts={[["name", "getFields"], "(): ", ["link", "GraphQLFieldMap", "/api-v16/type#graphqlfieldmap"], "\u003c\n  ", ["type", "TSource"], ",\n  ", ["type", "TContext"], "\n\u003e;"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["link", "GraphQLFieldMap", "/api-v16/type#graphqlfieldmap"], "\u003c", ["type", "TSource"], ", ", ["type", "TContext"], "\u003e"]} /></td>
      <td>The fields keyed by field name.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { assertObjectType } from 'graphql/type';

const schema = buildSchema(`
  type User {
    id: ID!
    name: String
  }

  type Query {
    viewer: User
  }
`);

const User = assertObjectType(schema.getType('User'));
const fields = User.getFields();

Object.keys(fields); // => ['id', 'name']
String(fields.id.type); // => 'ID!'
```

<hr className="api-subsection-divider" />

##### getInterfaces()

Returns the interfaces implemented by this type.

**Signature:**

<ApiSignature parts={[["name", "getInterfaces"], "(): ", ["keyword", "readonly"], " ", ["link", "GraphQLInterfaceType", "/api-v16/type#graphqlinterfacetype"], "[];"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "readonly"], " ", ["link", "GraphQLInterfaceType", "/api-v16/type#graphqlinterfacetype"], "[]"]} /></td>
      <td>The implemented interfaces.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { assertObjectType } from 'graphql/type';

const schema = buildSchema(`
  interface Node {
    id: ID!
  }

  type User implements Node {
    id: ID!
  }

  type Query {
    viewer: User
  }
`);

const User = assertObjectType(schema.getType('User'));

User.getInterfaces().map((type) => type.name); // => ['Node']
```

<hr className="api-subsection-divider" />

##### toConfig()

Returns a normalized configuration object for this object.

**Signature:**

<ApiSignature parts={[["name", "toConfig"], "(): \u007b\n  ", ["property", "interfaces"], ": ", ["type", "ReadonlyArray"], "\u003c", ["link", "GraphQLInterfaceType", "/api-v16/type#graphqlinterfacetype"], "\u003e;\n  ", ["property", "fields"], ": ", ["link", "GraphQLFieldConfigMap", "/api-v16/type#graphqlfieldconfigmap"], "\u003c", ["keyword", "any"], ", ", ["keyword", "any"], "\u003e;\n  ", ["property", "extensions"], ": ", ["type", "Readonly"], "\u003c\n    ", ["link", "GraphQLObjectTypeExtensions", "/api-v16/type#graphqlobjecttypeextensions"], "\u003c", ["type", "TSource"], ", ", ["type", "TContext"], "\u003e\n  \u003e;\n  ", ["property", "extensionASTNodes"], ": ", ["type", "ReadonlyArray"], "\u003c", ["link", "ObjectTypeExtensionNode", "/api-v16/language#objecttypeextensionnode"], "\u003e;\n\u007d;"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={["\u007b\n  ", ["property", "interfaces"], ": ", ["type", "ReadonlyArray"], "\u003c", ["link", "GraphQLInterfaceType", "/api-v16/type#graphqlinterfacetype"], "\u003e;\n  ", ["property", "fields"], ": ", ["link", "GraphQLFieldConfigMap", "/api-v16/type#graphqlfieldconfigmap"], "\u003c", ["keyword", "any"], ", ", ["keyword", "any"], "\u003e;\n  ", ["property", "extensions"], ": ", ["type", "Readonly"], "\u003c\n    ", ["link", "GraphQLObjectTypeExtensions", "/api-v16/type#graphqlobjecttypeextensions"], "\u003c", ["type", "TSource"], ", ", ["type", "TContext"], "\u003e\n  \u003e;\n  ", ["property", "extensionASTNodes"], ": ", ["type", "ReadonlyArray"], "\u003c", ["link", "ObjectTypeExtensionNode", "/api-v16/language#objecttypeextensionnode"], "\u003e;\n\u007d"]} /></td>
      <td>A configuration object that can be used to recreate this object.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { GraphQLObjectType, GraphQLString } from 'graphql/type';

const User = new GraphQLObjectType({
  name: 'User',
  fields: {
    name: { type: GraphQLString },
  },
});

const config = User.toConfig();
const UserCopy = new GraphQLObjectType(config);

config.fields.name.type; // => GraphQLString
UserCopy.getFields().name.type; // => GraphQLString
```

<hr className="api-subsection-divider" />

##### toString()

Returns the schema coordinate identifying this object type.

**Signature:**

<ApiSignature parts={[["name", "toString"], "(): ", ["keyword", "string"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The schema coordinate for this object type.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { assertObjectType } from 'graphql/type';

const schema = buildSchema(`
  type User {
    name: String
  }

  type Query {
    viewer: User
  }
`);

const User = assertObjectType(schema.getType('User'));

User.toString(); // => 'User'
```

<hr className="api-subsection-divider" />

##### toJSON()

Returns the JSON representation used when this object is serialized.

**Signature:**

<ApiSignature parts={[["name", "toJSON"], "(): ", ["keyword", "string"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The JSON-serializable representation.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { GraphQLObjectType, GraphQLString } from 'graphql/type';

const User = new GraphQLObjectType({
  name: 'User',
  fields: { name: { type: GraphQLString } },
});

User.toJSON(); // => 'User'
JSON.stringify({ type: User }); // => '{"type":"User"}'
```

<hr className="api-item-divider" />

#### GraphQLInterfaceType

Interface Type Definition

When a field can return one of a heterogeneous set of types, a Interface type
is used to describe what types are possible, what fields are in common across
all types, as well as a function to determine which type is actually used
when the field is resolved.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
const EntityType = new GraphQLInterfaceType({
  name: 'Entity',
  fields: {
    name: { type: GraphQLString }
  }
});
```

<hr className="api-subsection-divider" />

##### Constructor

Creates a GraphQLInterfaceType instance.

**Signature:**

<ApiSignature parts={[["keyword", "new"], " ", ["name", "GraphQLInterfaceType"], "(\n  ", ["parameter", "config"], ": ", ["type", "Readonly"], "\u003c", ["link", "GraphQLInterfaceTypeConfig", "/api-v16/type#graphqlinterfacetypeconfig"], "\u003c", ["keyword", "any"], ", ", ["keyword", "any"], "\u003e\u003e,\n);"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>config</td>
      <td><ApiType parts={[["type", "Readonly"], "\u003c", ["link", "GraphQLInterfaceTypeConfig", "/api-v16/type#graphqlinterfacetypeconfig"], "\u003c", ["keyword", "any"], ", ", ["keyword", "any"], "\u003e\u003e"]} /></td>
      <td>Configuration describing this object.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

##### Members

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>name</td>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The GraphQL name for this schema element.</td>
    </tr>
    <tr>
      <td>description</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Human-readable description for this schema element, if provided.</td>
    </tr>
    <tr>
      <td>resolveType</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "GraphQLTypeResolver", "/api-v16/type#graphqltyperesolver"], "\u003c", ["keyword", "any"], ", ", ["keyword", "any"], "\u003e\u003e"]} /></td>
      <td>Function that resolves the concrete object type for this abstract type.</td>
    </tr>
    <tr>
      <td>extensions</td>
      <td><ApiType parts={[["type", "Readonly"], "\u003c", ["link", "GraphQLInterfaceTypeExtensions", "/api-v16/type#graphqlinterfacetypeextensions"], "\u003e"]} /></td>
      <td>Extension fields to include in the formatted result.</td>
    </tr>
    <tr>
      <td>astNode</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "InterfaceTypeDefinitionNode", "/api-v16/language#interfacetypedefinitionnode"], "\u003e"]} /></td>
      <td>AST node from which this schema element was built, if available.</td>
    </tr>
    <tr>
      <td>extensionASTNodes</td>
      <td><ApiType parts={[["keyword", "readonly"], " ", ["link", "InterfaceTypeExtensionNode", "/api-v16/language#interfacetypeextensionnode"], "[]"]} /></td>
      <td>AST extension nodes applied to this schema element.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

##### getFields()

Returns the fields defined by this type.

**Signature:**

<ApiSignature parts={[["name", "getFields"], "(): ", ["link", "GraphQLFieldMap", "/api-v16/type#graphqlfieldmap"], "\u003c", ["keyword", "any"], ", ", ["keyword", "any"], "\u003e;"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["link", "GraphQLFieldMap", "/api-v16/type#graphqlfieldmap"], "\u003c", ["keyword", "any"], ", ", ["keyword", "any"], "\u003e"]} /></td>
      <td>The fields keyed by field name.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { assertInterfaceType } from 'graphql/type';

const schema = buildSchema(`
  interface Node {
    id: ID!
  }

  type User implements Node {
    id: ID!
  }

  type Query {
    node: Node
  }
`);

const Node = assertInterfaceType(schema.getType('Node'));
const fields = Node.getFields();

Object.keys(fields); // => ['id']
String(fields.id.type); // => 'ID!'
```

<hr className="api-subsection-divider" />

##### getInterfaces()

Returns the interfaces implemented by this type.

**Signature:**

<ApiSignature parts={[["name", "getInterfaces"], "(): ", ["keyword", "readonly"], " ", ["link", "GraphQLInterfaceType", "/api-v16/type#graphqlinterfacetype"], "[];"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "readonly"], " ", ["link", "GraphQLInterfaceType", "/api-v16/type#graphqlinterfacetype"], "[]"]} /></td>
      <td>The implemented interfaces.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { assertInterfaceType } from 'graphql/type';

const schema = buildSchema(`
  interface Resource {
    url: String!
  }

  interface Image implements Resource {
    url: String!
    width: Int
  }

  type Photo implements Resource & Image {
    url: String!
    width: Int
  }

  type Query {
    image: Image
  }
`);

const Image = assertInterfaceType(schema.getType('Image'));

Image.getInterfaces().map((type) => type.name); // => ['Resource']
```

<hr className="api-subsection-divider" />

##### toConfig()

Returns a normalized configuration object for this object.

**Signature:**

<ApiSignature parts={[["name", "toConfig"], "(): ", ["type", "GraphQLInterfaceTypeNormalizedConfig"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["type", "GraphQLInterfaceTypeNormalizedConfig"]]} /></td>
      <td>A configuration object that can be used to recreate this object.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { GraphQLID, GraphQLInterfaceType, GraphQLNonNull } from 'graphql/type';

const Node = new GraphQLInterfaceType({
  name: 'Node',
  fields: {
    id: { type: new GraphQLNonNull(GraphQLID) },
  },
});

const config = Node.toConfig();
const NodeCopy = new GraphQLInterfaceType(config);

String(config.fields.id.type); // => 'ID!'
String(NodeCopy.getFields().id.type); // => 'ID!'
```

<hr className="api-subsection-divider" />

##### toString()

Returns the schema coordinate identifying this interface type.

**Signature:**

<ApiSignature parts={[["name", "toString"], "(): ", ["keyword", "string"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The schema coordinate for this interface type.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { assertInterfaceType } from 'graphql/type';

const schema = buildSchema(`
  interface Node {
    id: ID!
  }

  type User implements Node {
    id: ID!
  }

  type Query {
    node: Node
  }
`);

const Node = assertInterfaceType(schema.getType('Node'));

Node.toString(); // => 'Node'
```

<hr className="api-subsection-divider" />

##### toJSON()

Returns the JSON representation used when this object is serialized.

**Signature:**

<ApiSignature parts={[["name", "toJSON"], "(): ", ["keyword", "string"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The JSON-serializable representation.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { GraphQLInterfaceType, GraphQLString } from 'graphql/type';

const Named = new GraphQLInterfaceType({
  name: 'Named',
  fields: { name: { type: GraphQLString } },
});

Named.toJSON(); // => 'Named'
JSON.stringify({ type: Named }); // => '{"type":"Named"}'
```

<hr className="api-item-divider" />

#### GraphQLUnionType

Union Type Definition

When a field can return one of a heterogeneous set of types, a Union type
is used to describe what types are possible as well as providing a function
to determine which type is actually used when the field is resolved.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
const PetType = new GraphQLUnionType({
  name: 'Pet',
  types: [DogType, CatType],
  resolveType: (value) => {
    if (value instanceof Dog) {
      return DogType;
    }
    if (value instanceof Cat) {
      return CatType;
    }
  }
});
```

<hr className="api-subsection-divider" />

##### Constructor

Creates a GraphQLUnionType instance.

**Signature:**

<ApiSignature parts={[["keyword", "new"], " ", ["name", "GraphQLUnionType"], "(\n  ", ["parameter", "config"], ": ", ["type", "Readonly"], "\u003c", ["link", "GraphQLUnionTypeConfig", "/api-v16/type#graphqluniontypeconfig"], "\u003c", ["keyword", "any"], ", ", ["keyword", "any"], "\u003e\u003e,\n);"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>config</td>
      <td><ApiType parts={[["type", "Readonly"], "\u003c", ["link", "GraphQLUnionTypeConfig", "/api-v16/type#graphqluniontypeconfig"], "\u003c", ["keyword", "any"], ", ", ["keyword", "any"], "\u003e\u003e"]} /></td>
      <td>Configuration describing this object.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

##### Members

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>name</td>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The GraphQL name for this schema element.</td>
    </tr>
    <tr>
      <td>description</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Human-readable description for this schema element, if provided.</td>
    </tr>
    <tr>
      <td>resolveType</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "GraphQLTypeResolver", "/api-v16/type#graphqltyperesolver"], "\u003c", ["keyword", "any"], ", ", ["keyword", "any"], "\u003e\u003e"]} /></td>
      <td>Function that resolves the concrete object type for this abstract type.</td>
    </tr>
    <tr>
      <td>extensions</td>
      <td><ApiType parts={[["type", "Readonly"], "\u003c", ["link", "GraphQLUnionTypeExtensions", "/api-v16/type#graphqluniontypeextensions"], "\u003e"]} /></td>
      <td>Extension fields to include in the formatted result.</td>
    </tr>
    <tr>
      <td>astNode</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "UnionTypeDefinitionNode", "/api-v16/language#uniontypedefinitionnode"], "\u003e"]} /></td>
      <td>AST node from which this schema element was built, if available.</td>
    </tr>
    <tr>
      <td>extensionASTNodes</td>
      <td><ApiType parts={[["keyword", "readonly"], " ", ["link", "UnionTypeExtensionNode", "/api-v16/language#uniontypeextensionnode"], "[]"]} /></td>
      <td>AST extension nodes applied to this schema element.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

##### getTypes()

Returns the object types included in this union.

**Signature:**

<ApiSignature parts={[["name", "getTypes"], "(): ", ["keyword", "readonly"], " ", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], "[];"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "readonly"], " ", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], "[]"]} /></td>
      <td>The union member object types.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { assertUnionType } from 'graphql/type';

const schema = buildSchema(`
  type Photo {
    url: String!
  }

  type Video {
    url: String!
  }

  union Media = Photo | Video

  type Query {
    media: [Media]
  }
`);

const Media = assertUnionType(schema.getType('Media'));

Media.getTypes().map((type) => type.name); // => ['Photo', 'Video']
```

<hr className="api-subsection-divider" />

##### toConfig()

Returns a normalized configuration object for this object.

**Signature:**

<ApiSignature parts={[["name", "toConfig"], "(): \u007b\n  ", ["property", "types"], ": ", ["type", "ReadonlyArray"], "\u003c", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], "\u003e;\n  ", ["property", "extensions"], ": ", ["type", "Readonly"], "\u003c", ["link", "GraphQLUnionTypeExtensions", "/api-v16/type#graphqluniontypeextensions"], "\u003e;\n  ", ["property", "extensionASTNodes"], ": ", ["type", "ReadonlyArray"], "\u003c", ["link", "UnionTypeExtensionNode", "/api-v16/language#uniontypeextensionnode"], "\u003e;\n\u007d;"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={["\u007b\n  ", ["property", "types"], ": ", ["type", "ReadonlyArray"], "\u003c", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], "\u003e;\n  ", ["property", "extensions"], ": ", ["type", "Readonly"], "\u003c", ["link", "GraphQLUnionTypeExtensions", "/api-v16/type#graphqluniontypeextensions"], "\u003e;\n  ", ["property", "extensionASTNodes"], ": ", ["type", "ReadonlyArray"], "\u003c", ["link", "UnionTypeExtensionNode", "/api-v16/language#uniontypeextensionnode"], "\u003e;\n\u007d"]} /></td>
      <td>A configuration object that can be used to recreate this object.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { GraphQLObjectType, GraphQLString, GraphQLUnionType } from 'graphql/type';

const Photo = new GraphQLObjectType({
  name: 'Photo',
  fields: { url: { type: GraphQLString } },
});
const Video = new GraphQLObjectType({
  name: 'Video',
  fields: { url: { type: GraphQLString } },
});
const Media = new GraphQLUnionType({
  name: 'Media',
  types: [Photo, Video],
});

const config = Media.toConfig();
const MediaCopy = new GraphQLUnionType(config);

MediaCopy.getTypes().map((type) => type.name); // => ['Photo', 'Video']
```

<hr className="api-subsection-divider" />

##### toString()

Returns the schema coordinate identifying this union type.

**Signature:**

<ApiSignature parts={[["name", "toString"], "(): ", ["keyword", "string"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The schema coordinate for this union type.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { assertUnionType } from 'graphql/type';

const schema = buildSchema(`
  type Photo {
    url: String!
  }

  union SearchResult = Photo

  type Query {
    search: [SearchResult]
  }
`);

const SearchResult = assertUnionType(schema.getType('SearchResult'));

SearchResult.toString(); // => 'SearchResult'
```

<hr className="api-subsection-divider" />

##### toJSON()

Returns the JSON representation used when this object is serialized.

**Signature:**

<ApiSignature parts={[["name", "toJSON"], "(): ", ["keyword", "string"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The JSON-serializable representation.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { GraphQLObjectType, GraphQLString, GraphQLUnionType } from 'graphql/type';

const Photo = new GraphQLObjectType({
  name: 'Photo',
  fields: { url: { type: GraphQLString } },
});
const SearchResult = new GraphQLUnionType({
  name: 'SearchResult',
  types: [Photo],
});

SearchResult.toJSON(); // => 'SearchResult'
JSON.stringify({ type: SearchResult }); // => '{"type":"SearchResult"}'
```

<hr className="api-item-divider" />

#### GraphQLEnumType

Enum Type Definition

Enum types define leaf values whose serialized form is one of a fixed set
of GraphQL enum names. Internally, enum values can map to any runtime value,
often integers.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { GraphQLEnumType } from 'graphql/type';

const RGBType = new GraphQLEnumType({
  name: 'RGB',
  values: {
    RED: { value: 0 },
    GREEN: { value: 1 },
    BLUE: { value: 2 },
  },
});

RGBType.getValue('GREEN')?.value; // => 1
```

Note: If a value is not provided in a definition, the name of the enum value
will be used as its internal value.

<hr className="api-subsection-divider" />

##### Constructor

Creates a GraphQLEnumType instance.

**Signature:**

<ApiSignature parts={[["keyword", "new"], " ", ["name", "GraphQLEnumType"], "(", ["parameter", "config"], ": ", ["type", "Readonly"], "\u003c", ["link", "GraphQLEnumTypeConfig", "/api-v16/type#graphqlenumtypeconfig"], "\u003e);"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>config</td>
      <td><ApiType parts={[["type", "Readonly"], "\u003c", ["link", "GraphQLEnumTypeConfig", "/api-v16/type#graphqlenumtypeconfig"], "\u003e"]} /></td>
      <td>Configuration describing this object.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

##### Members

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>name</td>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The GraphQL name for this schema element.</td>
    </tr>
    <tr>
      <td>description</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Human-readable description for this schema element, if provided.</td>
    </tr>
    <tr>
      <td>extensions</td>
      <td><ApiType parts={[["type", "Readonly"], "\u003c", ["link", "GraphQLEnumTypeExtensions", "/api-v16/type#graphqlenumtypeextensions"], "\u003e"]} /></td>
      <td>Extension fields to include in the formatted result.</td>
    </tr>
    <tr>
      <td>astNode</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "EnumTypeDefinitionNode", "/api-v16/language#enumtypedefinitionnode"], "\u003e"]} /></td>
      <td>AST node from which this schema element was built, if available.</td>
    </tr>
    <tr>
      <td>extensionASTNodes</td>
      <td><ApiType parts={[["keyword", "readonly"], " ", ["link", "EnumTypeExtensionNode", "/api-v16/language#enumtypeextensionnode"], "[]"]} /></td>
      <td>AST extension nodes applied to this schema element.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

##### getValues()

Returns the values defined by this enum type.

**Signature:**

<ApiSignature parts={[["name", "getValues"], "(): ", ["keyword", "readonly"], " ", ["link", "GraphQLEnumValue", "/api-v16/type#graphqlenumvalue"], "[];"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "readonly"], " ", ["link", "GraphQLEnumValue", "/api-v16/type#graphqlenumvalue"], "[]"]} /></td>
      <td>Enum value definitions in schema order.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { assertEnumType } from 'graphql/type';

const schema = buildSchema(`
  enum Episode {
    NEW_HOPE
    EMPIRE
    JEDI
  }

  type Query {
    episode: Episode
  }
`);

const Episode = assertEnumType(schema.getType('Episode'));

Episode.getValues().map((value) => value.name); // => ['NEW_HOPE', 'EMPIRE', 'JEDI']
```

<hr className="api-subsection-divider" />

##### getValue()

Returns the enum value definition for a value name.

**Signature:**

<ApiSignature parts={[["name", "getValue"], "(\n  ", ["parameter", "name"], ": ", ["keyword", "string"], ",\n): ", ["type", "Maybe"], "\u003c", ["link", "GraphQLEnumValue", "/api-v16/type#graphqlenumvalue"], "\u003e;"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>name</td>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The GraphQL name to look up.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "GraphQLEnumValue", "/api-v16/type#graphqlenumvalue"], "\u003e"]} /></td>
      <td>The matching enum value definition, if it exists.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { assertEnumType } from 'graphql/type';

const schema = buildSchema(`
  enum Episode {
    NEW_HOPE
    EMPIRE
  }

  type Query {
    episode: Episode
  }
`);

const Episode = assertEnumType(schema.getType('Episode'));

Episode.getValue('EMPIRE')?.name; // => 'EMPIRE'
Episode.getValue('JEDI'); // => undefined
```

<hr className="api-subsection-divider" />

##### serialize()

Serializes a runtime enum value as a GraphQL enum name.

**Signature:**

<ApiSignature parts={[["name", "serialize"], "(\n  ", ["parameter", "outputValue"], ": ", ["keyword", "unknown"], ",\n): ", ["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e;"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>outputValue</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>Runtime enum value to serialize.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>The GraphQL enum name for the runtime value.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { GraphQLEnumType } from 'graphql/type';

const RGB = new GraphQLEnumType({
  name: 'RGB',
  values: {
    RED: { value: 0 },
    GREEN: { value: 1 },
    BLUE: { value: 2 },
  },
});

RGB.serialize(1); // => 'GREEN'
RGB.serialize(3); // throws an error
```

<hr className="api-subsection-divider" />

##### parseValue()

Parses a GraphQL enum name from variable input.

**Signature:**

<ApiSignature parts={[["name", "parseValue"], "(", ["parameter", "inputValue"], ": ", ["keyword", "unknown"], "): ", ["keyword", "any"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>inputValue</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>Runtime input value to parse.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "any"]]} /></td>
      <td>The internal enum value represented by the input name.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { GraphQLEnumType } from 'graphql/type';

const RGB = new GraphQLEnumType({
  name: 'RGB',
  values: {
    RED: { value: 0 },
    GREEN: { value: 1 },
    BLUE: { value: 2 },
  },
});

RGB.parseValue('BLUE'); // => 2
RGB.parseValue('PURPLE'); // throws an error
RGB.parseValue(2); // throws an error
```

<hr className="api-subsection-divider" />

##### parseLiteral()

Parses a GraphQL enum name from an AST value literal.

**Signature:**

<ApiSignature parts={[["name", "parseLiteral"], "(\n  ", ["parameter", "valueNode"], ": ", ["link", "ValueNode", "/api-v16/language#valuenode"], ",\n  ", ["parameter", "_variables"], ": ", ["type", "Maybe"], "\u003c", ["type", "ObjMap"], "\u003c", ["keyword", "unknown"], "\u003e\u003e,\n): ", ["keyword", "any"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>valueNode</td>
      <td><ApiType parts={[["link", "ValueNode", "/api-v16/language#valuenode"]]} /></td>
      <td>AST value literal to parse.</td>
    </tr>
    <tr>
      <td>_variables</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["type", "ObjMap"], "\u003c", ["keyword", "unknown"], "\u003e\u003e"]} /></td>
      <td>Runtime variable values; ignored because enum literals cannot contain variables.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "any"]]} /></td>
      <td>The internal enum value represented by the literal.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { parseValue } from 'graphql/language';
import { GraphQLEnumType } from 'graphql/type';

const RGB = new GraphQLEnumType({
  name: 'RGB',
  values: {
    RED: { value: 0 },
    GREEN: { value: 1 },
    BLUE: { value: 2 },
  },
});

RGB.parseLiteral(parseValue('RED')); // => 0
RGB.parseLiteral(parseValue('"RED"')); // throws an error
```

<hr className="api-subsection-divider" />

##### toConfig()

Returns a normalized configuration object for this object.

**Signature:**

<ApiSignature parts={[["name", "toConfig"], "(): \u007b\n  ", ["property", "values"], ": ", ["type", "ObjMap"], "\u003c", ["link", "GraphQLEnumValueConfig", "/api-v16/type#graphqlenumvalueconfig"], "\u003e;\n  ", ["property", "extensions"], ": ", ["type", "Readonly"], "\u003c", ["link", "GraphQLEnumTypeExtensions", "/api-v16/type#graphqlenumtypeextensions"], "\u003e;\n  ", ["property", "extensionASTNodes"], ": ", ["type", "ReadonlyArray"], "\u003c", ["link", "EnumTypeExtensionNode", "/api-v16/language#enumtypeextensionnode"], "\u003e;\n\u007d;"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={["\u007b\n  ", ["property", "values"], ": ", ["type", "ObjMap"], "\u003c", ["link", "GraphQLEnumValueConfig", "/api-v16/type#graphqlenumvalueconfig"], "\u003e;\n  ", ["property", "extensions"], ": ", ["type", "Readonly"], "\u003c", ["link", "GraphQLEnumTypeExtensions", "/api-v16/type#graphqlenumtypeextensions"], "\u003e;\n  ", ["property", "extensionASTNodes"], ": ", ["type", "ReadonlyArray"], "\u003c", ["link", "EnumTypeExtensionNode", "/api-v16/language#enumtypeextensionnode"], "\u003e;\n\u007d"]} /></td>
      <td>A configuration object that can be used to recreate this object.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { GraphQLEnumType } from 'graphql/type';

const RGB = new GraphQLEnumType({
  name: 'RGB',
  values: {
    RED: { value: 0 },
    GREEN: { value: 1 },
    BLUE: { value: 2 },
  },
});

const config = RGB.toConfig();
const RGBCopy = new GraphQLEnumType(config);

config.values.GREEN.value; // => 1
RGBCopy.serialize(2); // => 'BLUE'
```

<hr className="api-subsection-divider" />

##### toString()

Returns the schema coordinate identifying this enum type.

**Signature:**

<ApiSignature parts={[["name", "toString"], "(): ", ["keyword", "string"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The schema coordinate for this enum type.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { assertEnumType } from 'graphql/type';

const schema = buildSchema(`
  enum Episode {
    NEW_HOPE
  }

  type Query {
    episode: Episode
  }
`);

const Episode = assertEnumType(schema.getType('Episode'));

Episode.toString(); // => 'Episode'
```

<hr className="api-subsection-divider" />

##### toJSON()

Returns the JSON representation used when this object is serialized.

**Signature:**

<ApiSignature parts={[["name", "toJSON"], "(): ", ["keyword", "string"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The JSON-serializable representation.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { GraphQLEnumType } from 'graphql/type';

const Episode = new GraphQLEnumType({
  name: 'Episode',
  values: {
    NEW_HOPE: {},
  },
});

Episode.toJSON(); // => 'Episode'
JSON.stringify({ type: Episode }); // => '{"type":"Episode"}'
```

<hr className="api-item-divider" />

#### GraphQLInputObjectType

Input Object Type Definition

An input object defines a structured collection of fields which may be
supplied to a field argument.

Using `NonNull` will ensure that a value must be provided by the query

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
const GeoPoint = new GraphQLInputObjectType({
  name: 'GeoPoint',
  fields: {
    lat: { type: new GraphQLNonNull(GraphQLFloat) },
    lon: { type: new GraphQLNonNull(GraphQLFloat) },
    alt: { type: GraphQLFloat, defaultValue: 0 },
  }
});
```

<hr className="api-subsection-divider" />

##### Constructor

Creates a GraphQLInputObjectType instance.

**Signature:**

<ApiSignature parts={[["keyword", "new"], " ", ["name", "GraphQLInputObjectType"], "(", ["parameter", "config"], ": ", ["type", "Readonly"], "\u003c", ["link", "GraphQLInputObjectTypeConfig", "/api-v16/type#graphqlinputobjecttypeconfig"], "\u003e);"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>config</td>
      <td><ApiType parts={[["type", "Readonly"], "\u003c", ["link", "GraphQLInputObjectTypeConfig", "/api-v16/type#graphqlinputobjecttypeconfig"], "\u003e"]} /></td>
      <td>Configuration describing this object.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

##### Members

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>name</td>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The GraphQL name for this schema element.</td>
    </tr>
    <tr>
      <td>description</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Human-readable description for this schema element, if provided.</td>
    </tr>
    <tr>
      <td>extensions</td>
      <td><ApiType parts={[["type", "Readonly"], "\u003c", ["link", "GraphQLInputObjectTypeExtensions", "/api-v16/type#graphqlinputobjecttypeextensions"], "\u003e"]} /></td>
      <td>Extension fields to include in the formatted result.</td>
    </tr>
    <tr>
      <td>astNode</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "InputObjectTypeDefinitionNode", "/api-v16/language#inputobjecttypedefinitionnode"], "\u003e"]} /></td>
      <td>AST node from which this schema element was built, if available.</td>
    </tr>
    <tr>
      <td>extensionASTNodes</td>
      <td><ApiType parts={[["keyword", "readonly"], " ", ["link", "InputObjectTypeExtensionNode", "/api-v16/language#inputobjecttypeextensionnode"], "[]"]} /></td>
      <td>AST extension nodes applied to this schema element.</td>
    </tr>
    <tr>
      <td>isOneOf</td>
      <td><ApiType parts={[["keyword", "boolean"]]} /></td>
      <td>Whether this input object uses the experimental OneOf input object semantics.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

##### getFields()

Returns the fields defined by this type.

**Signature:**

<ApiSignature parts={[["name", "getFields"], "(): ", ["link", "GraphQLInputFieldMap", "/api-v16/type#graphqlinputfieldmap"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["link", "GraphQLInputFieldMap", "/api-v16/type#graphqlinputfieldmap"]]} /></td>
      <td>The fields keyed by field name.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { assertInputObjectType } from 'graphql/type';

const schema = buildSchema(`
  input ReviewInput {
    stars: Int!
    commentary: String = ""
  }

  type Query {
    reviews(filter: ReviewInput): [String]
  }
`);

const ReviewInput = assertInputObjectType(schema.getType('ReviewInput'));
const fields = ReviewInput.getFields();

Object.keys(fields); // => ['stars', 'commentary']
fields.commentary.defaultValue; // => ''
```

<hr className="api-subsection-divider" />

##### toConfig()

Returns a normalized configuration object for this object.

**Signature:**

<ApiSignature parts={[["name", "toConfig"], "(): \u007b\n  ", ["property", "fields"], ": ", ["link", "GraphQLInputFieldConfigMap", "/api-v16/type#graphqlinputfieldconfigmap"], ";\n  ", ["property", "extensions"], ": ", ["type", "Readonly"], "\u003c", ["link", "GraphQLInputObjectTypeExtensions", "/api-v16/type#graphqlinputobjecttypeextensions"], "\u003e;\n  ", ["property", "extensionASTNodes"], ": ", ["type", "ReadonlyArray"], "\u003c", ["link", "InputObjectTypeExtensionNode", "/api-v16/language#inputobjecttypeextensionnode"], "\u003e;\n\u007d;"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={["\u007b\n  ", ["property", "fields"], ": ", ["link", "GraphQLInputFieldConfigMap", "/api-v16/type#graphqlinputfieldconfigmap"], ";\n  ", ["property", "extensions"], ": ", ["type", "Readonly"], "\u003c", ["link", "GraphQLInputObjectTypeExtensions", "/api-v16/type#graphqlinputobjecttypeextensions"], "\u003e;\n  ", ["property", "extensionASTNodes"], ": ", ["type", "ReadonlyArray"], "\u003c", ["link", "InputObjectTypeExtensionNode", "/api-v16/language#inputobjecttypeextensionnode"], "\u003e;\n\u007d"]} /></td>
      <td>A configuration object that can be used to recreate this object.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import {
  GraphQLInputObjectType,
  GraphQLInt,
  GraphQLNonNull,
} from 'graphql/type';

const ReviewInput = new GraphQLInputObjectType({
  name: 'ReviewInput',
  fields: {
    stars: { type: new GraphQLNonNull(GraphQLInt) },
  },
});

const config = ReviewInput.toConfig();
const ReviewInputCopy = new GraphQLInputObjectType(config);

String(config.fields.stars.type); // => 'Int!'
String(ReviewInputCopy.getFields().stars.type); // => 'Int!'
```

<hr className="api-subsection-divider" />

##### toString()

Returns the schema coordinate identifying this input object type.

**Signature:**

<ApiSignature parts={[["name", "toString"], "(): ", ["keyword", "string"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The schema coordinate for this input object type.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { assertInputObjectType } from 'graphql/type';

const schema = buildSchema(`
  input ReviewInput {
    stars: Int!
  }

  type Query {
    reviews(filter: ReviewInput): [String]
  }
`);

const ReviewInput = assertInputObjectType(schema.getType('ReviewInput'));

ReviewInput.toString(); // => 'ReviewInput'
```

<hr className="api-subsection-divider" />

##### toJSON()

Returns the JSON representation used when this object is serialized.

**Signature:**

<ApiSignature parts={[["name", "toJSON"], "(): ", ["keyword", "string"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The JSON-serializable representation.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { GraphQLInputObjectType, GraphQLString } from 'graphql/type';

const ReviewInput = new GraphQLInputObjectType({
  name: 'ReviewInput',
  fields: {
    commentary: { type: GraphQLString },
  },
});

ReviewInput.toJSON(); // => 'ReviewInput'
JSON.stringify({ type: ReviewInput }); // => '{"type":"ReviewInput"}'
```

### Functions

#### isType()

Returns true when the value is any GraphQL type.

**Signature:**

<ApiSignature parts={[["name", "isType"], "(\n  ", ["parameter", "type"], ": ", ["keyword", "unknown"], ",\n): ", ["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLType", "/api-v16/type#graphqltype"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLType", "/api-v16/type#graphqltype"]]} /></td>
      <td>True when the value is any GraphQL type.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { GraphQLList, GraphQLString, isType } from 'graphql/type';

const schema = buildSchema(`
  type Query {
    name: String
  }
`);

isType(GraphQLString); // => true
isType(new GraphQLList(GraphQLString)); // => true
isType(schema.getType('Query')); // => true
isType('String'); // => false
```

<hr className="api-item-divider" />

#### assertType()

Returns the value as a GraphQL type, or throws if it is not one.

**Signature:**

<ApiSignature parts={[["name", "assertType"], "(", ["parameter", "type"], ": ", ["keyword", "unknown"], "): ", ["link", "GraphQLType", "/api-v16/type#graphqltype"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["link", "GraphQLType", "/api-v16/type#graphqltype"]]} /></td>
      <td>The value typed as a GraphQL type.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { assertType } from 'graphql/type';

const schema = buildSchema(`
  type Query {
    name: String
  }
`);

const queryType = assertType(schema.getType('Query'));

queryType.toString(); // => 'Query'
assertType('Query'); // throws an error
```

<hr className="api-item-divider" />

#### isScalarType()

There are predicates for each kind of GraphQL type.

**Signature:**

<ApiSignature parts={[["name", "isScalarType"], "(\n  ", ["parameter", "type"], ": ", ["keyword", "unknown"], ",\n): ", ["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLScalarType", "/api-v16/type#graphqlscalartype"], "\u003c", ["keyword", "unknown"], ", ", ["keyword", "unknown"], "\u003e;"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLScalarType", "/api-v16/type#graphqlscalartype"], "\u003c", ["keyword", "unknown"], ", ", ["keyword", "unknown"], "\u003e"]} /></td>
      <td>True when the value is a GraphQLScalarType.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { isScalarType } from 'graphql/type';

const schema = buildSchema(`
  scalar DateTime

  type Query {
    createdAt: DateTime
  }
`);

isScalarType(schema.getType('DateTime')); // => true
isScalarType(schema.getType('Query')); // => false
```

<hr className="api-item-divider" />

#### assertScalarType()

Returns the value as a GraphQLScalarType, or throws if it is not one.

**Signature:**

<ApiSignature parts={[["name", "assertScalarType"], "(", ["parameter", "type"], ": ", ["keyword", "unknown"], "): ", ["link", "GraphQLScalarType", "/api-v16/type#graphqlscalartype"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["link", "GraphQLScalarType", "/api-v16/type#graphqlscalartype"]]} /></td>
      <td>The value typed as a GraphQLScalarType.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { assertScalarType } from 'graphql/type';

const schema = buildSchema(`
  scalar DateTime

  type Query {
    createdAt: DateTime
  }
`);

const dateTimeType = assertScalarType(schema.getType('DateTime'));

dateTimeType.name; // => 'DateTime'
assertScalarType(schema.getType('Query')); // throws an error
```

<hr className="api-item-divider" />

#### isObjectType()

Returns true when the value is a GraphQLObjectType.

**Signature:**

<ApiSignature parts={[["name", "isObjectType"], "(\n  ", ["parameter", "type"], ": ", ["keyword", "unknown"], ",\n): ", ["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"]]} /></td>
      <td>True when the value is a GraphQLObjectType.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { isObjectType } from 'graphql/type';

const schema = buildSchema(`
  input ReviewInput {
    stars: Int!
  }

  type User {
    name: String
  }

  type Query {
    user: User
  }
`);

isObjectType(schema.getType('User')); // => true
isObjectType(schema.getType('ReviewInput')); // => false
```

<hr className="api-item-divider" />

#### assertObjectType()

Returns the value as a GraphQLObjectType, or throws if it is not one.

**Signature:**

<ApiSignature parts={[["name", "assertObjectType"], "(", ["parameter", "type"], ": ", ["keyword", "unknown"], "): ", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"]]} /></td>
      <td>The value typed as a GraphQLObjectType.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { assertObjectType } from 'graphql/type';

const schema = buildSchema(`
  input ReviewInput {
    stars: Int!
  }

  type User {
    name: String
  }

  type Query {
    user: User
  }
`);

const userType = assertObjectType(schema.getType('User'));

Object.keys(userType.getFields()); // => ['name']
assertObjectType(schema.getType('ReviewInput')); // throws an error
```

<hr className="api-item-divider" />

#### isInterfaceType()

Returns true when the value is a GraphQLInterfaceType.

**Signature:**

<ApiSignature parts={[["name", "isInterfaceType"], "(\n  ", ["parameter", "type"], ": ", ["keyword", "unknown"], ",\n): ", ["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLInterfaceType", "/api-v16/type#graphqlinterfacetype"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLInterfaceType", "/api-v16/type#graphqlinterfacetype"]]} /></td>
      <td>True when the value is a GraphQLInterfaceType.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { isInterfaceType } from 'graphql/type';

const schema = buildSchema(`
  interface Node {
    id: ID!
  }

  type User implements Node {
    id: ID!
  }

  type Query {
    node: Node
  }
`);

isInterfaceType(schema.getType('Node')); // => true
isInterfaceType(schema.getType('User')); // => false
```

<hr className="api-item-divider" />

#### assertInterfaceType()

Returns the value as a GraphQLInterfaceType, or throws if it is not one.

**Signature:**

<ApiSignature parts={[["name", "assertInterfaceType"], "(", ["parameter", "type"], ": ", ["keyword", "unknown"], "): ", ["link", "GraphQLInterfaceType", "/api-v16/type#graphqlinterfacetype"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["link", "GraphQLInterfaceType", "/api-v16/type#graphqlinterfacetype"]]} /></td>
      <td>The value typed as a GraphQLInterfaceType.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { assertInterfaceType } from 'graphql/type';

const schema = buildSchema(`
  interface Node {
    id: ID!
  }

  type User implements Node {
    id: ID!
  }

  type Query {
    node: Node
  }
`);

const nodeType = assertInterfaceType(schema.getType('Node'));

nodeType.name; // => 'Node'
assertInterfaceType(schema.getType('User')); // throws an error
```

<hr className="api-item-divider" />

#### isUnionType()

Returns true when the value is a GraphQLUnionType.

**Signature:**

<ApiSignature parts={[["name", "isUnionType"], "(\n  ", ["parameter", "type"], ": ", ["keyword", "unknown"], ",\n): ", ["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLUnionType", "/api-v16/type#graphqluniontype"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLUnionType", "/api-v16/type#graphqluniontype"]]} /></td>
      <td>True when the value is a GraphQLUnionType.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { isUnionType } from 'graphql/type';

const schema = buildSchema(`
  type Photo {
    url: String!
  }

  type Video {
    url: String!
  }

  union Media = Photo | Video

  type Query {
    media: [Media]
  }
`);

isUnionType(schema.getType('Media')); // => true
isUnionType(schema.getType('Photo')); // => false
```

<hr className="api-item-divider" />

#### assertUnionType()

Returns the value as a GraphQLUnionType, or throws if it is not one.

**Signature:**

<ApiSignature parts={[["name", "assertUnionType"], "(", ["parameter", "type"], ": ", ["keyword", "unknown"], "): ", ["link", "GraphQLUnionType", "/api-v16/type#graphqluniontype"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["link", "GraphQLUnionType", "/api-v16/type#graphqluniontype"]]} /></td>
      <td>The value typed as a GraphQLUnionType.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { assertUnionType } from 'graphql/type';

const schema = buildSchema(`
  type Photo {
    url: String!
  }

  type Video {
    url: String!
  }

  union Media = Photo | Video

  type Query {
    media: [Media]
  }
`);

const mediaType = assertUnionType(schema.getType('Media'));

mediaType.getTypes().map((type) => type.name); // => ['Photo', 'Video']
assertUnionType(schema.getType('Photo')); // throws an error
```

<hr className="api-item-divider" />

#### isEnumType()

Returns true when the value is a GraphQLEnumType.

**Signature:**

<ApiSignature parts={[["name", "isEnumType"], "(\n  ", ["parameter", "type"], ": ", ["keyword", "unknown"], ",\n): ", ["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLEnumType", "/api-v16/type#graphqlenumtype"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLEnumType", "/api-v16/type#graphqlenumtype"]]} /></td>
      <td>True when the value is a GraphQLEnumType.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { isEnumType } from 'graphql/type';

const schema = buildSchema(`
  enum Episode {
    NEW_HOPE
    EMPIRE
  }

  type Query {
    favoriteEpisode: Episode
  }
`);

isEnumType(schema.getType('Episode')); // => true
isEnumType(schema.getType('Query')); // => false
```

<hr className="api-item-divider" />

#### assertEnumType()

Returns the value as a GraphQLEnumType, or throws if it is not one.

**Signature:**

<ApiSignature parts={[["name", "assertEnumType"], "(", ["parameter", "type"], ": ", ["keyword", "unknown"], "): ", ["link", "GraphQLEnumType", "/api-v16/type#graphqlenumtype"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["link", "GraphQLEnumType", "/api-v16/type#graphqlenumtype"]]} /></td>
      <td>The value typed as a GraphQLEnumType.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { assertEnumType } from 'graphql/type';

const schema = buildSchema(`
  enum Episode {
    NEW_HOPE
    EMPIRE
  }

  type Query {
    favoriteEpisode: Episode
  }
`);

const episodeType = assertEnumType(schema.getType('Episode'));

episodeType.getValues().map((value) => value.name); // => ['NEW_HOPE', 'EMPIRE']
assertEnumType(schema.getType('Query')); // throws an error
```

<hr className="api-item-divider" />

#### isInputObjectType()

Returns true when the value is a GraphQLInputObjectType.

**Signature:**

<ApiSignature parts={[["name", "isInputObjectType"], "(\n  ", ["parameter", "type"], ": ", ["keyword", "unknown"], ",\n): ", ["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLInputObjectType", "/api-v16/type#graphqlinputobjecttype"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLInputObjectType", "/api-v16/type#graphqlinputobjecttype"]]} /></td>
      <td>True when the value is a GraphQLInputObjectType.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { isInputObjectType } from 'graphql/type';

const schema = buildSchema(`
  input ReviewInput {
    stars: Int!
  }

  type Review {
    stars: Int!
  }

  type Query {
    review(input: ReviewInput): Review
  }
`);

isInputObjectType(schema.getType('ReviewInput')); // => true
isInputObjectType(schema.getType('Review')); // => false
```

<hr className="api-item-divider" />

#### assertInputObjectType()

Returns the value as a GraphQLInputObjectType, or throws if it is not one.

**Signature:**

<ApiSignature parts={[["name", "assertInputObjectType"], "(", ["parameter", "type"], ": ", ["keyword", "unknown"], "): ", ["link", "GraphQLInputObjectType", "/api-v16/type#graphqlinputobjecttype"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["link", "GraphQLInputObjectType", "/api-v16/type#graphqlinputobjecttype"]]} /></td>
      <td>The value typed as a GraphQLInputObjectType.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { assertInputObjectType } from 'graphql/type';

const schema = buildSchema(`
  input ReviewInput {
    stars: Int!
  }

  type Review {
    stars: Int!
  }

  type Query {
    review(input: ReviewInput): Review
  }
`);

const inputType = assertInputObjectType(schema.getType('ReviewInput'));

Object.keys(inputType.getFields()); // => ['stars']
assertInputObjectType(schema.getType('Review')); // throws an error
```

<hr className="api-item-divider" />

#### assertListType()

Returns the value as a GraphQLList, or throws if it is not one.

**Signature:**

<ApiSignature parts={[["name", "assertListType"], "(\n  ", ["parameter", "type"], ": ", ["keyword", "unknown"], ",\n): ", ["link", "GraphQLList", "/api-v16/type#graphqllist"], "\u003c", ["link", "GraphQLType", "/api-v16/type#graphqltype"], "\u003e;"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["link", "GraphQLList", "/api-v16/type#graphqllist"], "\u003c", ["link", "GraphQLType", "/api-v16/type#graphqltype"], "\u003e"]} /></td>
      <td>The value typed as a GraphQLList.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { GraphQLList, GraphQLString, assertListType } from 'graphql/type';

const listType = assertListType(new GraphQLList(GraphQLString));

listType.ofType; // => GraphQLString
assertListType(GraphQLString); // throws an error
```

<hr className="api-item-divider" />

#### assertNonNullType()

Returns the value as a GraphQLNonNull, or throws if it is not one.

**Signature:**

<ApiSignature parts={[["name", "assertNonNullType"], "(\n  ", ["parameter", "type"], ": ", ["keyword", "unknown"], ",\n): ", ["link", "GraphQLNonNull", "/api-v16/type#graphqlnonnull"], "\u003c", ["link", "GraphQLType", "/api-v16/type#graphqltype"], "\u003e;"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["link", "GraphQLNonNull", "/api-v16/type#graphqlnonnull"], "\u003c", ["link", "GraphQLType", "/api-v16/type#graphqltype"], "\u003e"]} /></td>
      <td>The value typed as a GraphQLNonNull.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { GraphQLNonNull, GraphQLString, assertNonNullType } from 'graphql/type';

const nonNullType = assertNonNullType(new GraphQLNonNull(GraphQLString));

nonNullType.ofType; // => GraphQLString
assertNonNullType(GraphQLString); // throws an error
```

<hr className="api-item-divider" />

#### isInputType()

Returns true when the value can be used as a GraphQL input type.

**Signature:**

<ApiSignature parts={[["name", "isInputType"], "(\n  ", ["parameter", "type"], ": ", ["keyword", "unknown"], ",\n): ", ["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLInputType", "/api-v16/type#graphqlinputtype"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLInputType", "/api-v16/type#graphqlinputtype"]]} /></td>
      <td>True when the value can be used as a GraphQL input type.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { isInputType } from 'graphql/type';

const schema = buildSchema(`
  input ReviewInput {
    stars: Int!
  }

  type Review {
    stars: Int!
  }

  type Query {
    review(input: ReviewInput): Review
  }
`);

isInputType(schema.getType('ReviewInput')); // => true
isInputType(schema.getType('Review')); // => false
```

<hr className="api-item-divider" />

#### assertInputType()

Returns the value as a GraphQL input type, or throws if it is not one.

**Signature:**

<ApiSignature parts={[["name", "assertInputType"], "(", ["parameter", "type"], ": ", ["keyword", "unknown"], "): ", ["link", "GraphQLInputType", "/api-v16/type#graphqlinputtype"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["link", "GraphQLInputType", "/api-v16/type#graphqlinputtype"]]} /></td>
      <td>The value typed as a GraphQL input type.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { assertInputType } from 'graphql/type';

const schema = buildSchema(`
  input ReviewInput {
    stars: Int!
  }

  type Review {
    stars: Int!
  }

  type Query {
    review(input: ReviewInput): Review
  }
`);

const inputType = assertInputType(schema.getType('ReviewInput'));

inputType.toString(); // => 'ReviewInput'
assertInputType(schema.getType('Review')); // throws an error
```

<hr className="api-item-divider" />

#### isOutputType()

Returns true when the value can be used as a GraphQL output type.

**Signature:**

<ApiSignature parts={[["name", "isOutputType"], "(\n  ", ["parameter", "type"], ": ", ["keyword", "unknown"], ",\n): ", ["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLOutputType", "/api-v16/type#graphqloutputtype"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLOutputType", "/api-v16/type#graphqloutputtype"]]} /></td>
      <td>True when the value can be used as a GraphQL output type.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { isOutputType } from 'graphql/type';

const schema = buildSchema(`
  input ReviewInput {
    stars: Int!
  }

  type Review {
    stars: Int!
  }

  type Query {
    review(input: ReviewInput): Review
  }
`);

isOutputType(schema.getType('Review')); // => true
isOutputType(schema.getType('ReviewInput')); // => false
```

<hr className="api-item-divider" />

#### assertOutputType()

Returns the value as a GraphQL output type, or throws if it is not one.

**Signature:**

<ApiSignature parts={[["name", "assertOutputType"], "(", ["parameter", "type"], ": ", ["keyword", "unknown"], "): ", ["link", "GraphQLOutputType", "/api-v16/type#graphqloutputtype"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["link", "GraphQLOutputType", "/api-v16/type#graphqloutputtype"]]} /></td>
      <td>The value typed as a GraphQL output type.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { assertOutputType } from 'graphql/type';

const schema = buildSchema(`
  input ReviewInput {
    stars: Int!
  }

  type Review {
    stars: Int!
  }

  type Query {
    review(input: ReviewInput): Review
  }
`);

const outputType = assertOutputType(schema.getType('Review'));

outputType.toString(); // => 'Review'
assertOutputType(schema.getType('ReviewInput')); // throws an error
```

<hr className="api-item-divider" />

#### isLeafType()

Returns true when the value is a GraphQL scalar or enum type.

**Signature:**

<ApiSignature parts={[["name", "isLeafType"], "(\n  ", ["parameter", "type"], ": ", ["keyword", "unknown"], ",\n): ", ["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLLeafType", "/api-v16/type#graphqlleaftype"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLLeafType", "/api-v16/type#graphqlleaftype"]]} /></td>
      <td>True when the value is a GraphQL scalar or enum type.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { isLeafType } from 'graphql/type';

const schema = buildSchema(`
  enum Episode {
    NEW_HOPE
  }

  type Review {
    stars: Int!
  }

  type Query {
    episode: Episode
    review: Review
  }
`);

isLeafType(schema.getType('Episode')); // => true
isLeafType(schema.getType('String')); // => true
isLeafType(schema.getType('Review')); // => false
```

<hr className="api-item-divider" />

#### assertLeafType()

Returns the value as a GraphQL leaf type, or throws if it is not one.

**Signature:**

<ApiSignature parts={[["name", "assertLeafType"], "(", ["parameter", "type"], ": ", ["keyword", "unknown"], "): ", ["link", "GraphQLLeafType", "/api-v16/type#graphqlleaftype"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["link", "GraphQLLeafType", "/api-v16/type#graphqlleaftype"]]} /></td>
      <td>The value typed as a GraphQL leaf type.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { assertLeafType } from 'graphql/type';

const schema = buildSchema(`
  enum Episode {
    NEW_HOPE
  }

  type Review {
    stars: Int!
  }

  type Query {
    episode: Episode
    review: Review
  }
`);

const episodeType = assertLeafType(schema.getType('Episode'));

episodeType.toString(); // => 'Episode'
assertLeafType(schema.getType('Review')); // throws an error
```

<hr className="api-item-divider" />

#### isCompositeType()

Returns true when the value is a GraphQL object, interface, or union type.

**Signature:**

<ApiSignature parts={[["name", "isCompositeType"], "(\n  ", ["parameter", "type"], ": ", ["keyword", "unknown"], ",\n): ", ["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLCompositeType", "/api-v16/type#graphqlcompositetype"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLCompositeType", "/api-v16/type#graphqlcompositetype"]]} /></td>
      <td>True when the value is a GraphQL object, interface, or union type.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { isCompositeType } from 'graphql/type';

const schema = buildSchema(`
  interface Node {
    id: ID!
  }

  type User implements Node {
    id: ID!
  }

  union SearchResult = User

  type Query {
    node: Node
    search: [SearchResult]
  }
`);

isCompositeType(schema.getType('User')); // => true
isCompositeType(schema.getType('Node')); // => true
isCompositeType(schema.getType('SearchResult')); // => true
isCompositeType(schema.getType('String')); // => false
```

<hr className="api-item-divider" />

#### assertCompositeType()

Returns the value as a GraphQL composite type, or throws if it is not one.

**Signature:**

<ApiSignature parts={[["name", "assertCompositeType"], "(", ["parameter", "type"], ": ", ["keyword", "unknown"], "): ", ["link", "GraphQLCompositeType", "/api-v16/type#graphqlcompositetype"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["link", "GraphQLCompositeType", "/api-v16/type#graphqlcompositetype"]]} /></td>
      <td>The value typed as a GraphQL composite type.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { assertCompositeType } from 'graphql/type';

const schema = buildSchema(`
  interface Node {
    id: ID!
  }

  type User implements Node {
    id: ID!
  }

  type Query {
    node: Node
  }
`);

const userType = assertCompositeType(schema.getType('User'));

userType.toString(); // => 'User'
assertCompositeType(schema.getType('String')); // throws an error
```

<hr className="api-item-divider" />

#### isAbstractType()

Returns true when the value is a GraphQL interface or union type.

**Signature:**

<ApiSignature parts={[["name", "isAbstractType"], "(\n  ", ["parameter", "type"], ": ", ["keyword", "unknown"], ",\n): ", ["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLAbstractType", "/api-v16/type#graphqlabstracttype"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLAbstractType", "/api-v16/type#graphqlabstracttype"]]} /></td>
      <td>True when the value is a GraphQL interface or union type.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { isAbstractType } from 'graphql/type';

const schema = buildSchema(`
  interface Node {
    id: ID!
  }

  type User implements Node {
    id: ID!
  }

  union SearchResult = User

  type Query {
    node: Node
    search: [SearchResult]
  }
`);

isAbstractType(schema.getType('Node')); // => true
isAbstractType(schema.getType('SearchResult')); // => true
isAbstractType(schema.getType('User')); // => false
```

<hr className="api-item-divider" />

#### assertAbstractType()

Returns the value as a GraphQL abstract type, or throws if it is not one.

**Signature:**

<ApiSignature parts={[["name", "assertAbstractType"], "(", ["parameter", "type"], ": ", ["keyword", "unknown"], "): ", ["link", "GraphQLAbstractType", "/api-v16/type#graphqlabstracttype"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["link", "GraphQLAbstractType", "/api-v16/type#graphqlabstracttype"]]} /></td>
      <td>The value typed as a GraphQL abstract type.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { assertAbstractType } from 'graphql/type';

const schema = buildSchema(`
  interface Node {
    id: ID!
  }

  type User implements Node {
    id: ID!
  }

  type Query {
    node: Node
  }
`);

const nodeType = assertAbstractType(schema.getType('Node'));

nodeType.toString(); // => 'Node'
assertAbstractType(schema.getType('User')); // throws an error
```

<hr className="api-item-divider" />

#### isWrappingType()

Returns true when the value is a GraphQL list or non-null wrapper type.

**Signature:**

<ApiSignature parts={[["name", "isWrappingType"], "(\n  ", ["parameter", "type"], ": ", ["keyword", "unknown"], ",\n): ", ["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLWrappingType", "/api-v16/type#graphqlwrappingtype"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLWrappingType", "/api-v16/type#graphqlwrappingtype"]]} /></td>
      <td>True when the value is a GraphQL list or non-null wrapper type.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import {
  GraphQLList,
  GraphQLNonNull,
  GraphQLString,
  isWrappingType,
} from 'graphql/type';

isWrappingType(new GraphQLList(GraphQLString)); // => true
isWrappingType(new GraphQLNonNull(GraphQLString)); // => true
isWrappingType(GraphQLString); // => false
```

<hr className="api-item-divider" />

#### assertWrappingType()

Returns the value as a GraphQL wrapping type, or throws if it is not one.

**Signature:**

<ApiSignature parts={[["name", "assertWrappingType"], "(", ["parameter", "type"], ": ", ["keyword", "unknown"], "): ", ["link", "GraphQLWrappingType", "/api-v16/type#graphqlwrappingtype"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["link", "GraphQLWrappingType", "/api-v16/type#graphqlwrappingtype"]]} /></td>
      <td>The value typed as a GraphQL wrapping type.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { GraphQLList, GraphQLString, assertWrappingType } from 'graphql/type';

const wrappingType = assertWrappingType(new GraphQLList(GraphQLString));

wrappingType.toString(); // => '[String]'
assertWrappingType(GraphQLString); // throws an error
```

<hr className="api-item-divider" />

#### isNullableType()

Returns true when the value is a GraphQL type that can accept null.

**Signature:**

<ApiSignature parts={[["name", "isNullableType"], "(\n  ", ["parameter", "type"], ": ", ["keyword", "unknown"], ",\n): ", ["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLNullableType", "/api-v16/type#graphqlnullabletype"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLNullableType", "/api-v16/type#graphqlnullabletype"]]} /></td>
      <td>True when the value is a GraphQL type that can accept null.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { GraphQLNonNull, GraphQLString, isNullableType } from 'graphql/type';

isNullableType(GraphQLString); // => true
isNullableType(new GraphQLNonNull(GraphQLString)); // => false
isNullableType(null); // => false
```

<hr className="api-item-divider" />

#### assertNullableType()

Returns the value as a nullable GraphQL type, or throws if it is not one.

**Signature:**

<ApiSignature parts={[["name", "assertNullableType"], "(", ["parameter", "type"], ": ", ["keyword", "unknown"], "): ", ["link", "GraphQLNullableType", "/api-v16/type#graphqlnullabletype"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["link", "GraphQLNullableType", "/api-v16/type#graphqlnullabletype"]]} /></td>
      <td>The value typed as a nullable GraphQL type.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import {
  GraphQLNonNull,
  GraphQLString,
  assertNullableType,
} from 'graphql/type';

const nullableType = assertNullableType(GraphQLString);

nullableType; // => GraphQLString
assertNullableType(new GraphQLNonNull(GraphQLString)); // throws an error
```

<hr className="api-item-divider" />

#### isNamedType()

Returns true when the value is a GraphQL named type.

**Signature:**

<ApiSignature parts={[["name", "isNamedType"], "(\n  ", ["parameter", "type"], ": ", ["keyword", "unknown"], ",\n): ", ["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLNamedType", "/api-v16/type#graphqlnamedtype"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["parameter", "type"], " ", ["keyword", "is"], " ", ["link", "GraphQLNamedType", "/api-v16/type#graphqlnamedtype"]]} /></td>
      <td>True when the value is a GraphQL named type.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { GraphQLList, GraphQLString, isNamedType } from 'graphql/type';

isNamedType(GraphQLString); // => true
isNamedType(new GraphQLList(GraphQLString)); // => false
isNamedType(null); // => false
```

<hr className="api-item-divider" />

#### assertNamedType()

Returns the value as a GraphQL named type, or throws if it is not one.

**Signature:**

<ApiSignature parts={[["name", "assertNamedType"], "(", ["parameter", "type"], ": ", ["keyword", "unknown"], "): ", ["link", "GraphQLNamedType", "/api-v16/type#graphqlnamedtype"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["link", "GraphQLNamedType", "/api-v16/type#graphqlnamedtype"]]} /></td>
      <td>The value typed as a GraphQL named type.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { GraphQLList, GraphQLString, assertNamedType } from 'graphql/type';

const namedType = assertNamedType(GraphQLString);

namedType.name; // => 'String'
assertNamedType(new GraphQLList(GraphQLString)); // throws an error
```

<hr className="api-item-divider" />

#### resolveReadonlyArrayThunk()

Resolves a thunked readonly array.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type Parameters</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Constraint</th>
      <th>Default</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>T</td>
      <td></td>
      <td></td>
      <td>The element type resolved from the thunk or array.</td>
    </tr>
  </tbody>
</table>

**Signature:**

<ApiSignature parts={[["name", "resolveReadonlyArrayThunk"], "\u003c", ["type", "T"], "\u003e(\n  ", ["parameter", "thunk"], ": ", ["link", "ThunkReadonlyArray", "/api-v16/type#thunkreadonlyarray"], "\u003c", ["type", "T"], "\u003e,\n): ", ["keyword", "readonly"], " ", ["type", "T"], "[];"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>thunk</td>
      <td><ApiType parts={[["link", "ThunkReadonlyArray", "/api-v16/type#thunkreadonlyarray"], "\u003c", ["type", "T"], "\u003e"]} /></td>
      <td>The thunk or value to resolve.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "readonly"], " ", ["type", "T"], "[]"]} /></td>
      <td>The resolved readonly array.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { GraphQLString, resolveReadonlyArrayThunk } from 'graphql/type';

const lazyFields = resolveReadonlyArrayThunk(() => [GraphQLString]);
const fields = resolveReadonlyArrayThunk([GraphQLString]);

lazyFields; // => [GraphQLString]
fields; // => [GraphQLString]
```

<hr className="api-item-divider" />

#### resolveObjMapThunk()

Resolves a thunked object map.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type Parameters</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Constraint</th>
      <th>Default</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>T</td>
      <td></td>
      <td></td>
      <td>The object-map value type resolved from the thunk or map.</td>
    </tr>
  </tbody>
</table>

**Signature:**

<ApiSignature parts={[["name", "resolveObjMapThunk"], "\u003c", ["type", "T"], "\u003e(\n  ", ["parameter", "thunk"], ": ", ["link", "ThunkObjMap", "/api-v16/type#thunkobjmap"], "\u003c", ["type", "T"], "\u003e,\n): ", ["type", "ObjMap"], "\u003c", ["type", "T"], "\u003e;"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>thunk</td>
      <td><ApiType parts={[["link", "ThunkObjMap", "/api-v16/type#thunkobjmap"], "\u003c", ["type", "T"], "\u003e"]} /></td>
      <td>The thunk or value to resolve.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["type", "ObjMap"], "\u003c", ["type", "T"], "\u003e"]} /></td>
      <td>The resolved object map.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { GraphQLString, resolveObjMapThunk } from 'graphql/type';

const lazyFields = resolveObjMapThunk(() => ({ name: GraphQLString }));
const fields = resolveObjMapThunk({ name: GraphQLString });

lazyFields.name; // => GraphQLString
fields.name; // => GraphQLString
```

<hr className="api-item-divider" />

#### isRequiredArgument()

Returns true when the argument is non-null and has no default value.

**Signature:**

<ApiSignature parts={[["name", "isRequiredArgument"], "(", ["parameter", "arg"], ": ", ["link", "GraphQLArgument", "/api-v16/type#graphqlargument"], "): ", ["keyword", "boolean"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>arg</td>
      <td><ApiType parts={[["link", "GraphQLArgument", "/api-v16/type#graphqlargument"]]} /></td>
      <td>The argument definition to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "boolean"]]} /></td>
      <td>True when the argument is non-null and has no default value.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import {
  GraphQLInt,
  GraphQLNonNull,
  GraphQLString,
  isRequiredArgument,
} from 'graphql/type';

const requiredArgument = { name: 'id', type: new GraphQLNonNull(GraphQLInt) };
const optionalArgument = { name: 'name', type: GraphQLString };
const argumentWithDefault = {
  name: 'limit',
  type: new GraphQLNonNull(GraphQLInt),
  defaultValue: 10,
};

isRequiredArgument(requiredArgument); // => true
isRequiredArgument(optionalArgument); // => false
isRequiredArgument(argumentWithDefault); // => false
```

<hr className="api-item-divider" />

#### isRequiredInputField()

Returns true when the input field is non-null and has no default value.

**Signature:**

<ApiSignature parts={[["name", "isRequiredInputField"], "(", ["parameter", "field"], ": ", ["link", "GraphQLInputField", "/api-v16/type#graphqlinputfield"], "): ", ["keyword", "boolean"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>field</td>
      <td><ApiType parts={[["link", "GraphQLInputField", "/api-v16/type#graphqlinputfield"]]} /></td>
      <td>The input field definition to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "boolean"]]} /></td>
      <td>True when the input field is non-null and has no default value.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import {
  GraphQLInt,
  GraphQLNonNull,
  GraphQLString,
  isRequiredInputField,
} from 'graphql/type';

const requiredField = { name: 'id', type: new GraphQLNonNull(GraphQLInt) };
const optionalField = { name: 'name', type: GraphQLString };
const fieldWithDefault = {
  name: 'limit',
  type: new GraphQLNonNull(GraphQLInt),
  defaultValue: 10,
};

isRequiredInputField(requiredField); // => true
isRequiredInputField(optionalField); // => false
isRequiredInputField(fieldWithDefault); // => false
```

### Types

#### GraphQLType

**Type alias.** These are all of the possible kinds of types.

<ApiSignature parts={[["keyword", "type"], " ", ["name", "GraphQLType"], " =\n  \u007c ", ["link", "GraphQLScalarType", "/api-v16/type#graphqlscalartype"], "\n  \u007c ", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], "\n  \u007c ", ["link", "GraphQLInterfaceType", "/api-v16/type#graphqlinterfacetype"], "\n  \u007c ", ["link", "GraphQLUnionType", "/api-v16/type#graphqluniontype"], "\n  \u007c ", ["link", "GraphQLEnumType", "/api-v16/type#graphqlenumtype"], "\n  \u007c ", ["link", "GraphQLInputObjectType", "/api-v16/type#graphqlinputobjecttype"], "\n  \u007c ", ["link", "GraphQLList", "/api-v16/type#graphqllist"], "\u003c", ["link", "GraphQLType", "/api-v16/type#graphqltype"], "\u003e\n  \u007c ", ["link", "GraphQLNonNull", "/api-v16/type#graphqlnonnull"], "\u003c\n      \u007c ", ["link", "GraphQLScalarType", "/api-v16/type#graphqlscalartype"], "\n      \u007c ", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], "\n      \u007c ", ["link", "GraphQLInterfaceType", "/api-v16/type#graphqlinterfacetype"], "\n      \u007c ", ["link", "GraphQLUnionType", "/api-v16/type#graphqluniontype"], "\n      \u007c ", ["link", "GraphQLEnumType", "/api-v16/type#graphqlenumtype"], "\n      \u007c ", ["link", "GraphQLInputObjectType", "/api-v16/type#graphqlinputobjecttype"], "\n      \u007c ", ["link", "GraphQLList", "/api-v16/type#graphqllist"], "\u003c", ["link", "GraphQLType", "/api-v16/type#graphqltype"], "\u003e\n    \u003e;"]} />

<hr className="api-item-divider" />

#### GraphQLInputType

**Type alias.** These types may be used as input types for arguments and directives.

<ApiSignature parts={[["keyword", "type"], " ", ["name", "GraphQLInputType"], " =\n  \u007c ", ["link", "GraphQLScalarType", "/api-v16/type#graphqlscalartype"], "\n  \u007c ", ["link", "GraphQLEnumType", "/api-v16/type#graphqlenumtype"], "\n  \u007c ", ["link", "GraphQLInputObjectType", "/api-v16/type#graphqlinputobjecttype"], "\n  \u007c ", ["link", "GraphQLList", "/api-v16/type#graphqllist"], "\u003c", ["link", "GraphQLInputType", "/api-v16/type#graphqlinputtype"], "\u003e\n  \u007c ", ["link", "GraphQLNonNull", "/api-v16/type#graphqlnonnull"], "\u003c\n      \u007c ", ["link", "GraphQLScalarType", "/api-v16/type#graphqlscalartype"], "\n      \u007c ", ["link", "GraphQLEnumType", "/api-v16/type#graphqlenumtype"], "\n      \u007c ", ["link", "GraphQLInputObjectType", "/api-v16/type#graphqlinputobjecttype"], "\n      \u007c ", ["link", "GraphQLList", "/api-v16/type#graphqllist"], "\u003c", ["link", "GraphQLInputType", "/api-v16/type#graphqlinputtype"], "\u003e\n    \u003e;"]} />

<hr className="api-item-divider" />

#### GraphQLOutputType

**Type alias.** These types may be used as output types as the result of fields.

<ApiSignature parts={[["keyword", "type"], " ", ["name", "GraphQLOutputType"], " =\n  \u007c ", ["link", "GraphQLScalarType", "/api-v16/type#graphqlscalartype"], "\n  \u007c ", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], "\n  \u007c ", ["link", "GraphQLInterfaceType", "/api-v16/type#graphqlinterfacetype"], "\n  \u007c ", ["link", "GraphQLUnionType", "/api-v16/type#graphqluniontype"], "\n  \u007c ", ["link", "GraphQLEnumType", "/api-v16/type#graphqlenumtype"], "\n  \u007c ", ["link", "GraphQLList", "/api-v16/type#graphqllist"], "\u003c", ["link", "GraphQLOutputType", "/api-v16/type#graphqloutputtype"], "\u003e\n  \u007c ", ["link", "GraphQLNonNull", "/api-v16/type#graphqlnonnull"], "\u003c\n      \u007c ", ["link", "GraphQLScalarType", "/api-v16/type#graphqlscalartype"], "\n      \u007c ", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], "\n      \u007c ", ["link", "GraphQLInterfaceType", "/api-v16/type#graphqlinterfacetype"], "\n      \u007c ", ["link", "GraphQLUnionType", "/api-v16/type#graphqluniontype"], "\n      \u007c ", ["link", "GraphQLEnumType", "/api-v16/type#graphqlenumtype"], "\n      \u007c ", ["link", "GraphQLList", "/api-v16/type#graphqllist"], "\u003c", ["link", "GraphQLOutputType", "/api-v16/type#graphqloutputtype"], "\u003e\n    \u003e;"]} />

<hr className="api-item-divider" />

#### GraphQLLeafType

**Type alias.** These types may describe types which may be leaf values.

<ApiSignature parts={[["keyword", "type"], " ", ["name", "GraphQLLeafType"], " = ", ["link", "GraphQLScalarType", "/api-v16/type#graphqlscalartype"], " \u007c ", ["link", "GraphQLEnumType", "/api-v16/type#graphqlenumtype"], ";"]} />

<hr className="api-item-divider" />

#### GraphQLCompositeType

**Type alias.** These types may describe the parent context of a selection set.

<ApiSignature parts={[["keyword", "type"], " ", ["name", "GraphQLCompositeType"], " =\n  \u007c ", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], "\n  \u007c ", ["link", "GraphQLInterfaceType", "/api-v16/type#graphqlinterfacetype"], "\n  \u007c ", ["link", "GraphQLUnionType", "/api-v16/type#graphqluniontype"], ";"]} />

<hr className="api-item-divider" />

#### GraphQLAbstractType

**Type alias.** These types may describe the parent context of a selection set.

<ApiSignature parts={[["keyword", "type"], " ", ["name", "GraphQLAbstractType"], " = ", ["link", "GraphQLInterfaceType", "/api-v16/type#graphqlinterfacetype"], " \u007c ", ["link", "GraphQLUnionType", "/api-v16/type#graphqluniontype"], ";"]} />

<hr className="api-item-divider" />

#### GraphQLWrappingType

**Type alias.** These types wrap and modify other types

<ApiSignature parts={[["keyword", "type"], " ", ["name", "GraphQLWrappingType"], " =\n  \u007c ", ["link", "GraphQLList", "/api-v16/type#graphqllist"], "\u003c", ["link", "GraphQLType", "/api-v16/type#graphqltype"], "\u003e\n  \u007c ", ["link", "GraphQLNonNull", "/api-v16/type#graphqlnonnull"], "\u003c", ["link", "GraphQLType", "/api-v16/type#graphqltype"], "\u003e;"]} />

<hr className="api-item-divider" />

#### GraphQLNullableType

**Type alias.** These types can all accept null as a value.

<ApiSignature parts={[["keyword", "type"], " ", ["name", "GraphQLNullableType"], " =\n  \u007c ", ["link", "GraphQLScalarType", "/api-v16/type#graphqlscalartype"], "\n  \u007c ", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], "\n  \u007c ", ["link", "GraphQLInterfaceType", "/api-v16/type#graphqlinterfacetype"], "\n  \u007c ", ["link", "GraphQLUnionType", "/api-v16/type#graphqluniontype"], "\n  \u007c ", ["link", "GraphQLEnumType", "/api-v16/type#graphqlenumtype"], "\n  \u007c ", ["link", "GraphQLInputObjectType", "/api-v16/type#graphqlinputobjecttype"], "\n  \u007c ", ["link", "GraphQLList", "/api-v16/type#graphqllist"], "\u003c", ["link", "GraphQLType", "/api-v16/type#graphqltype"], "\u003e;"]} />

<hr className="api-item-divider" />

#### GraphQLNamedType

**Type alias.** These named types do not include modifiers like List or NonNull.

<ApiSignature parts={[["keyword", "type"], " ", ["name", "GraphQLNamedType"], " = ", ["link", "GraphQLNamedInputType", "/api-v16/type#graphqlnamedinputtype"], " \u007c ", ["link", "GraphQLNamedOutputType", "/api-v16/type#graphqlnamedoutputtype"], ";"]} />

<hr className="api-item-divider" />

#### GraphQLNamedInputType

**Type alias.** A named GraphQL type that can be used as an input type.

<ApiSignature parts={[["keyword", "type"], " ", ["name", "GraphQLNamedInputType"], " =\n  \u007c ", ["link", "GraphQLScalarType", "/api-v16/type#graphqlscalartype"], "\n  \u007c ", ["link", "GraphQLEnumType", "/api-v16/type#graphqlenumtype"], "\n  \u007c ", ["link", "GraphQLInputObjectType", "/api-v16/type#graphqlinputobjecttype"], ";"]} />

<hr className="api-item-divider" />

#### GraphQLNamedOutputType

**Type alias.** A named GraphQL type that can be used as an output type.

<ApiSignature parts={[["keyword", "type"], " ", ["name", "GraphQLNamedOutputType"], " =\n  \u007c ", ["link", "GraphQLScalarType", "/api-v16/type#graphqlscalartype"], "\n  \u007c ", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], "\n  \u007c ", ["link", "GraphQLInterfaceType", "/api-v16/type#graphqlinterfacetype"], "\n  \u007c ", ["link", "GraphQLUnionType", "/api-v16/type#graphqluniontype"], "\n  \u007c ", ["link", "GraphQLEnumType", "/api-v16/type#graphqlenumtype"], ";"]} />

<hr className="api-item-divider" />

#### ThunkReadonlyArray

**Type alias.** Used while defining GraphQL types to allow for circular references in
otherwise immutable type definitions.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type Parameters</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Constraint</th>
      <th>Default</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>T</td>
      <td></td>
      <td></td>
      <td>The element type returned by the thunk or array.</td>
    </tr>
  </tbody>
</table>

<ApiSignature parts={[["keyword", "type"], " ", ["name", "ThunkReadonlyArray"], "\u003c", ["type", "T"], "\u003e =\n  \u007c (() =\u003e ", ["type", "ReadonlyArray"], "\u003c", ["type", "T"], "\u003e)\n  \u007c ", ["type", "ReadonlyArray"], "\u003c", ["type", "T"], "\u003e;"]} />

<hr className="api-item-divider" />

#### ThunkObjMap

**Type alias.** A thunk that resolves to an object map.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type Parameters</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Constraint</th>
      <th>Default</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>T</td>
      <td></td>
      <td></td>
      <td>Value type stored in the object map.</td>
    </tr>
  </tbody>
</table>

<ApiSignature parts={[["keyword", "type"], " ", ["name", "ThunkObjMap"], "\u003c", ["type", "T"], "\u003e =\n  \u007c (() =\u003e ", ["type", "ObjMap"], "\u003c", ["type", "T"], "\u003e)\n  \u007c ", ["type", "ObjMap"], "\u003c", ["type", "T"], "\u003e;"]} />

<hr className="api-item-divider" />

#### GraphQLScalarTypeExtensions

**Interface.** Custom extensions

**Remarks:** Use a unique identifier name for your extension, for example the name of
your library or project. Do not use a shortened identifier as this increases
the risk of conflicts. We recommend you add at most one extension field,
an object which can contain all the values you need.

<hr className="api-item-divider" />

#### GraphQLScalarSerializer

**Type alias.** Serializes a runtime value as a scalar output value.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type Parameters</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Constraint</th>
      <th>Default</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>TExternal</td>
      <td></td>
      <td></td>
      <td>The serialized representation returned for GraphQL results.</td>
    </tr>
  </tbody>
</table>

<ApiSignature parts={[["keyword", "type"], " ", ["name", "GraphQLScalarSerializer"], "\u003c", ["type", "TExternal"], "\u003e = (\n  ", ["parameter", "outputValue"], ": ", ["keyword", "unknown"], ",\n) =\u003e ", ["type", "TExternal"], ";"]} />

<hr className="api-item-divider" />

#### GraphQLScalarValueParser

**Type alias.** Parses a runtime input value as a scalar input value.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type Parameters</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Constraint</th>
      <th>Default</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>TInternal</td>
      <td></td>
      <td></td>
      <td>The internal runtime representation produced from variable input.</td>
    </tr>
  </tbody>
</table>

<ApiSignature parts={[["keyword", "type"], " ", ["name", "GraphQLScalarValueParser"], "\u003c", ["type", "TInternal"], "\u003e = (\n  ", ["parameter", "inputValue"], ": ", ["keyword", "unknown"], ",\n) =\u003e ", ["type", "TInternal"], ";"]} />

<hr className="api-item-divider" />

#### GraphQLScalarLiteralParser

**Type alias.** Parses a GraphQL value literal as a scalar input value.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type Parameters</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Constraint</th>
      <th>Default</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>TInternal</td>
      <td></td>
      <td></td>
      <td>The internal runtime representation produced from literal input.</td>
    </tr>
  </tbody>
</table>

<ApiSignature parts={[["keyword", "type"], " ", ["name", "GraphQLScalarLiteralParser"], "\u003c", ["type", "TInternal"], "\u003e = (\n  ", ["parameter", "valueNode"], ": ", ["link", "ValueNode", "/api-v16/language#valuenode"], ",\n  ", ["parameter", "variables"], "?: ", ["type", "Maybe"], "\u003c", ["type", "ObjMap"], "\u003c", ["keyword", "unknown"], "\u003e\u003e,\n) =\u003e ", ["type", "TInternal"], ";"]} />

<hr className="api-item-divider" />

#### GraphQLScalarTypeConfig

**Interface.** Configuration used to construct a GraphQLScalarType.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type Parameters</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Constraint</th>
      <th>Default</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>TInternal</td>
      <td></td>
      <td></td>
      <td>The internal runtime representation accepted by this scalar.</td>
    </tr>
    <tr>
      <td>TExternal</td>
      <td></td>
      <td></td>
      <td>The serialized representation exposed in GraphQL results.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Members</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>name</td>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The GraphQL name for this schema element.</td>
    </tr>
    <tr>
      <td>description?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Human-readable description for this schema element, if provided.</td>
    </tr>
    <tr>
      <td>specifiedByURL?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>URL identifying the behavior specified for this custom scalar.</td>
    </tr>
    <tr>
      <td>serialize?</td>
      <td><ApiType parts={[["link", "GraphQLScalarSerializer", "/api-v16/type#graphqlscalarserializer"], "\u003c", ["type", "TExternal"], "\u003e"]} /></td>
      <td>Serializes an internal value to include in a response.</td>
    </tr>
    <tr>
      <td>parseValue?</td>
      <td><ApiType parts={[["link", "GraphQLScalarValueParser", "/api-v16/type#graphqlscalarvalueparser"], "\u003c", ["type", "TInternal"], "\u003e"]} /></td>
      <td>Parses an externally provided value to use as an input.</td>
    </tr>
    <tr>
      <td>parseLiteral?</td>
      <td><ApiType parts={[["link", "GraphQLScalarLiteralParser", "/api-v16/type#graphqlscalarliteralparser"], "\u003c", ["type", "TInternal"], "\u003e"]} /></td>
      <td>Parses an externally provided literal value to use as an input.</td>
    </tr>
    <tr>
      <td>extensions?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["type", "Readonly"], "\u003c", ["link", "GraphQLScalarTypeExtensions", "/api-v16/type#graphqlscalartypeextensions"], "\u003e\u003e"]} /></td>
      <td>Extension fields to include in the formatted result.</td>
    </tr>
    <tr>
      <td>astNode?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "ScalarTypeDefinitionNode", "/api-v16/language#scalartypedefinitionnode"], "\u003e"]} /></td>
      <td>AST node from which this schema element was built, if available.</td>
    </tr>
    <tr>
      <td>extensionASTNodes?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "readonly"], " ", ["link", "ScalarTypeExtensionNode", "/api-v16/language#scalartypeextensionnode"], "[]\u003e"]} /></td>
      <td>AST extension nodes applied to this schema element.</td>
    </tr>
  </tbody>
</table>

<hr className="api-item-divider" />

#### GraphQLObjectTypeExtensions

**Interface.** Custom extensions

**Remarks:** Use a unique identifier name for your extension, for example the name of
your library or project. Do not use a shortened identifier as this increases
the risk of conflicts. We recommend you add at most one extension field,
an object which can contain all the values you need.
We've provided these template arguments because this is an open type and
you may find them useful.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type Parameters</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Constraint</th>
      <th>Default</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>_TSource</td>
      <td></td>
      <td><ApiType parts={[["keyword", "any"]]} /></td>
      <td>Reserved source type parameter for extension typing.</td>
    </tr>
    <tr>
      <td>_TContext</td>
      <td></td>
      <td><ApiType parts={[["keyword", "any"]]} /></td>
      <td>Reserved context type parameter for extension typing.</td>
    </tr>
  </tbody>
</table>

<hr className="api-item-divider" />

#### GraphQLObjectTypeConfig

**Interface.** Configuration used to construct a GraphQLObjectType.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type Parameters</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Constraint</th>
      <th>Default</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>TSource</td>
      <td></td>
      <td></td>
      <td>Source object type passed to resolvers.</td>
    </tr>
    <tr>
      <td>TContext</td>
      <td></td>
      <td></td>
      <td>Context object type passed to resolvers.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Members</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>name</td>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The GraphQL name for this schema element.</td>
    </tr>
    <tr>
      <td>description?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Human-readable description for this schema element, if provided.</td>
    </tr>
    <tr>
      <td>interfaces?</td>
      <td><ApiType parts={[["link", "ThunkReadonlyArray", "/api-v16/type#thunkreadonlyarray"], "\u003c", ["link", "GraphQLInterfaceType", "/api-v16/type#graphqlinterfacetype"], "\u003e"]} /></td>
      <td>Interfaces implemented by this object or interface type.</td>
    </tr>
    <tr>
      <td>fields</td>
      <td><ApiType parts={[["link", "ThunkObjMap", "/api-v16/type#thunkobjmap"], "\u003c\n  ", ["link", "GraphQLFieldConfig", "/api-v16/type#graphqlfieldconfig"], "\u003c", ["type", "TSource"], ", ", ["type", "TContext"], "\u003e\n\u003e"]} /></td>
      <td>Fields declared by this object, interface, input object, or literal.</td>
    </tr>
    <tr>
      <td>isTypeOf?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c\n  ", ["link", "GraphQLIsTypeOfFn", "/api-v16/type#graphqlistypeoffn"], "\u003c", ["type", "TSource"], ", ", ["type", "TContext"], "\u003e\n\u003e"]} /></td>
      <td>Predicate used to determine whether a runtime value belongs to this object type.</td>
    </tr>
    <tr>
      <td>extensions?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c\n  ", ["type", "Readonly"], "\u003c\n    ", ["link", "GraphQLObjectTypeExtensions", "/api-v16/type#graphqlobjecttypeextensions"], "\u003c", ["type", "TSource"], ", ", ["type", "TContext"], "\u003e\n  \u003e\n\u003e"]} /></td>
      <td>Extension fields to include in the formatted result.</td>
    </tr>
    <tr>
      <td>astNode?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "ObjectTypeDefinitionNode", "/api-v16/language#objecttypedefinitionnode"], "\u003e"]} /></td>
      <td>AST node from which this schema element was built, if available.</td>
    </tr>
    <tr>
      <td>extensionASTNodes?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "readonly"], " ", ["link", "ObjectTypeExtensionNode", "/api-v16/language#objecttypeextensionnode"], "[]\u003e"]} /></td>
      <td>AST extension nodes applied to this schema element.</td>
    </tr>
  </tbody>
</table>

<hr className="api-item-divider" />

#### GraphQLTypeResolver

**Type alias.** Resolves the concrete object type for an abstract GraphQL type.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type Parameters</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Constraint</th>
      <th>Default</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>TSource</td>
      <td></td>
      <td></td>
      <td>Source object type passed to resolvers.</td>
    </tr>
    <tr>
      <td>TContext</td>
      <td></td>
      <td></td>
      <td>Context object type passed to resolvers.</td>
    </tr>
  </tbody>
</table>

<ApiSignature parts={[["keyword", "type"], " ", ["name", "GraphQLTypeResolver"], "\u003c", ["type", "TSource"], ", ", ["type", "TContext"], "\u003e = (\n  ", ["parameter", "value"], ": ", ["type", "TSource"], ",\n  ", ["parameter", "context"], ": ", ["type", "TContext"], ",\n  ", ["parameter", "info"], ": ", ["link", "GraphQLResolveInfo", "/api-v16/type#graphqlresolveinfo"], ",\n  ", ["parameter", "abstractType"], ": ", ["link", "GraphQLAbstractType", "/api-v16/type#graphqlabstracttype"], ",\n) =\u003e ", ["type", "PromiseOrValue"], "\u003c", ["keyword", "string"], " \u007c ", ["keyword", "undefined"], "\u003e;"]} />

<hr className="api-item-divider" />

#### GraphQLIsTypeOfFn

**Type alias.** Checks whether a runtime value belongs to a GraphQL object type.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type Parameters</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Constraint</th>
      <th>Default</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>TSource</td>
      <td></td>
      <td></td>
      <td>Source object type tested against this object type.</td>
    </tr>
    <tr>
      <td>TContext</td>
      <td></td>
      <td></td>
      <td>Context object type passed to resolvers.</td>
    </tr>
  </tbody>
</table>

<ApiSignature parts={[["keyword", "type"], " ", ["name", "GraphQLIsTypeOfFn"], "\u003c", ["type", "TSource"], ", ", ["type", "TContext"], "\u003e = (\n  ", ["parameter", "source"], ": ", ["type", "TSource"], ",\n  ", ["parameter", "context"], ": ", ["type", "TContext"], ",\n  ", ["parameter", "info"], ": ", ["link", "GraphQLResolveInfo", "/api-v16/type#graphqlresolveinfo"], ",\n) =\u003e ", ["type", "PromiseOrValue"], "\u003c", ["keyword", "boolean"], "\u003e;"]} />

<hr className="api-item-divider" />

#### GraphQLFieldResolver

**Type alias.** Resolves the runtime value for a GraphQL field.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type Parameters</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Constraint</th>
      <th>Default</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>TSource</td>
      <td></td>
      <td></td>
      <td>Source object type passed to resolvers.</td>
    </tr>
    <tr>
      <td>TContext</td>
      <td></td>
      <td></td>
      <td>Context object type passed to resolvers.</td>
    </tr>
    <tr>
      <td>TArgs</td>
      <td></td>
      <td><ApiType parts={[["keyword", "any"]]} /></td>
      <td>Argument object type passed to resolvers.</td>
    </tr>
    <tr>
      <td>TResult</td>
      <td></td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>Result value type.</td>
    </tr>
  </tbody>
</table>

<ApiSignature parts={[["keyword", "type"], " ", ["name", "GraphQLFieldResolver"], "\u003c\n  ", ["type", "TSource"], ",\n  ", ["type", "TContext"], ",\n  ", ["type", "TArgs"], " = ", ["keyword", "any"], ",\n  ", ["type", "TResult"], " = ", ["keyword", "unknown"], ",\n\u003e = (\n  ", ["parameter", "source"], ": ", ["type", "TSource"], ",\n  ", ["parameter", "args"], ": ", ["type", "TArgs"], ",\n  ", ["parameter", "context"], ": ", ["type", "TContext"], ",\n  ", ["parameter", "info"], ": ", ["link", "GraphQLResolveInfo", "/api-v16/type#graphqlresolveinfo"], ",\n) =\u003e ", ["type", "TResult"], ";"]} />

<hr className="api-item-divider" />

#### GraphQLResolveInfo

**Interface.** Information about the currently executing GraphQL field.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Members</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>fieldName</td>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The field name referenced by this schema coordinate.</td>
    </tr>
    <tr>
      <td>fieldNodes</td>
      <td><ApiType parts={[["keyword", "readonly"], " ", ["link", "FieldNode", "/api-v16/language#fieldnode"], "[]"]} /></td>
      <td>AST field nodes that contributed to the current field execution.</td>
    </tr>
    <tr>
      <td>returnType</td>
      <td><ApiType parts={[["link", "GraphQLOutputType", "/api-v16/type#graphqloutputtype"]]} /></td>
      <td>GraphQL output type declared for the current field.</td>
    </tr>
    <tr>
      <td>parentType</td>
      <td><ApiType parts={[["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"]]} /></td>
      <td>Object type that owns the current field.</td>
    </tr>
    <tr>
      <td>path</td>
      <td><ApiType parts={[["link", "Path", "/api-v16/type#responsepath"]]} /></td>
      <td>Response path where this error occurred during execution.</td>
    </tr>
    <tr>
      <td>schema</td>
      <td><ApiType parts={[["link", "GraphQLSchema", "/api-v16/type#graphqlschema"]]} /></td>
      <td>The schema used for validation or execution.</td>
    </tr>
    <tr>
      <td>fragments</td>
      <td><ApiType parts={[["type", "ObjMap"], "\u003c", ["link", "FragmentDefinitionNode", "/api-v16/language#fragmentdefinitionnode"], "\u003e"]} /></td>
      <td>Fragment definitions in the operation document keyed by fragment name.</td>
    </tr>
    <tr>
      <td>rootValue</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>Initial root value passed to the operation.</td>
    </tr>
    <tr>
      <td>operation</td>
      <td><ApiType parts={[["link", "OperationDefinitionNode", "/api-v16/language#operationdefinitionnode"]]} /></td>
      <td>The operation selected for execution.</td>
    </tr>
    <tr>
      <td>variableValues</td>
      <td><ApiType parts={["\u007b [", ["parameter", "variable"], ": ", ["keyword", "string"], "]: ", ["keyword", "unknown"], " \u007d"]} /></td>
      <td>Runtime variable values keyed by variable name.</td>
    </tr>
  </tbody>
</table>

<hr className="api-item-divider" />

#### GraphQLFieldExtensions

**Interface.** Custom extensions

**Remarks:** Use a unique identifier name for your extension, for example the name of
your library or project. Do not use a shortened identifier as this increases
the risk of conflicts. We recommend you add at most one extension field,
an object which can contain all the values you need.
We've provided these template arguments because this is an open type and
you may find them useful.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type Parameters</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Constraint</th>
      <th>Default</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>_TSource</td>
      <td></td>
      <td></td>
      <td>Reserved source type parameter for extension typing.</td>
    </tr>
    <tr>
      <td>_TContext</td>
      <td></td>
      <td></td>
      <td>Reserved context type parameter for extension typing.</td>
    </tr>
    <tr>
      <td>_TArgs</td>
      <td></td>
      <td><ApiType parts={[["keyword", "any"]]} /></td>
      <td>Reserved argument type parameter for extension typing.</td>
    </tr>
  </tbody>
</table>

<hr className="api-item-divider" />

#### GraphQLFieldConfig

**Interface.** Configuration used to define a GraphQL field.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type Parameters</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Constraint</th>
      <th>Default</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>TSource</td>
      <td></td>
      <td></td>
      <td>Source object type passed to resolvers.</td>
    </tr>
    <tr>
      <td>TContext</td>
      <td></td>
      <td></td>
      <td>Context object type passed to resolvers.</td>
    </tr>
    <tr>
      <td>TArgs</td>
      <td></td>
      <td><ApiType parts={[["keyword", "any"]]} /></td>
      <td>Argument object type passed to resolvers.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Members</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>description?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Human-readable description for this schema element, if provided.</td>
    </tr>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["link", "GraphQLOutputType", "/api-v16/type#graphqloutputtype"]]} /></td>
      <td>The GraphQL type reference or runtime type for this element.</td>
    </tr>
    <tr>
      <td>args?</td>
      <td><ApiType parts={[["link", "GraphQLFieldConfigArgumentMap", "/api-v16/type#graphqlfieldconfigargumentmap"]]} /></td>
      <td>Arguments accepted by this field or directive.</td>
    </tr>
    <tr>
      <td>resolve?</td>
      <td><ApiType parts={[["link", "GraphQLFieldResolver", "/api-v16/type#graphqlfieldresolver"], "\u003c\n  ", ["type", "TSource"], ",\n  ", ["type", "TContext"], ",\n  ", ["type", "TArgs"], "\n\u003e"]} /></td>
      <td>Resolver function used to produce this field value.</td>
    </tr>
    <tr>
      <td>subscribe?</td>
      <td><ApiType parts={[["link", "GraphQLFieldResolver", "/api-v16/type#graphqlfieldresolver"], "\u003c\n  ", ["type", "TSource"], ",\n  ", ["type", "TContext"], ",\n  ", ["type", "TArgs"], "\n\u003e"]} /></td>
      <td>Resolver function used to create a subscription event stream for this field.</td>
    </tr>
    <tr>
      <td>deprecationReason?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Reason this element is deprecated, if one was provided.</td>
    </tr>
    <tr>
      <td>extensions?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c\n  ", ["type", "Readonly"], "\u003c\n    ", ["link", "GraphQLFieldExtensions", "/api-v16/type#graphqlfieldextensions"], "\u003c\n      ", ["type", "TSource"], ",\n      ", ["type", "TContext"], ",\n      ", ["type", "TArgs"], "\n    \u003e\n  \u003e\n\u003e"]} /></td>
      <td>Extension fields to include in the formatted result.</td>
    </tr>
    <tr>
      <td>astNode?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "FieldDefinitionNode", "/api-v16/language#fielddefinitionnode"], "\u003e"]} /></td>
      <td>AST node from which this schema element was built, if available.</td>
    </tr>
  </tbody>
</table>

<hr className="api-item-divider" />

#### GraphQLFieldConfigArgumentMap

**Type alias.** A map of argument names to argument configuration objects.

<ApiSignature parts={[["keyword", "type"], " ", ["name", "GraphQLFieldConfigArgumentMap"], " = ", ["type", "ObjMap"], "\u003c", ["link", "GraphQLArgumentConfig", "/api-v16/type#graphqlargumentconfig"], "\u003e;"]} />

<hr className="api-item-divider" />

#### GraphQLArgumentExtensions

**Interface.** Custom extensions

**Remarks:** Use a unique identifier name for your extension, for example the name of
your library or project. Do not use a shortened identifier as this increases
the risk of conflicts. We recommend you add at most one extension field,
an object which can contain all the values you need.

<hr className="api-item-divider" />

#### GraphQLArgumentConfig

**Interface.** Configuration used to define a GraphQL argument.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Members</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>description?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Human-readable description for this schema element, if provided.</td>
    </tr>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["link", "GraphQLInputType", "/api-v16/type#graphqlinputtype"]]} /></td>
      <td>The GraphQL type reference or runtime type for this element.</td>
    </tr>
    <tr>
      <td>defaultValue?</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>Default value used when no explicit value is supplied.</td>
    </tr>
    <tr>
      <td>deprecationReason?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Reason this element is deprecated, if one was provided.</td>
    </tr>
    <tr>
      <td>extensions?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["type", "Readonly"], "\u003c", ["link", "GraphQLArgumentExtensions", "/api-v16/type#graphqlargumentextensions"], "\u003e\u003e"]} /></td>
      <td>Extension fields to include in the formatted result.</td>
    </tr>
    <tr>
      <td>astNode?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "InputValueDefinitionNode", "/api-v16/language#inputvaluedefinitionnode"], "\u003e"]} /></td>
      <td>AST node from which this schema element was built, if available.</td>
    </tr>
  </tbody>
</table>

<hr className="api-item-divider" />

#### GraphQLFieldConfigMap

**Type alias.** A map of field names to field configuration objects.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type Parameters</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Constraint</th>
      <th>Default</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>TSource</td>
      <td></td>
      <td></td>
      <td>Source object type passed to resolvers.</td>
    </tr>
    <tr>
      <td>TContext</td>
      <td></td>
      <td></td>
      <td>Context object type passed to resolvers.</td>
    </tr>
  </tbody>
</table>

<ApiSignature parts={[["keyword", "type"], " ", ["name", "GraphQLFieldConfigMap"], "\u003c", ["type", "TSource"], ", ", ["type", "TContext"], "\u003e =\n  ", ["type", "ObjMap"], "\u003c\n    ", ["link", "GraphQLFieldConfig", "/api-v16/type#graphqlfieldconfig"], "\u003c", ["type", "TSource"], ", ", ["type", "TContext"], "\u003e\n  \u003e;"]} />

<hr className="api-item-divider" />

#### GraphQLField

**Interface.** A resolved GraphQL field definition.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type Parameters</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Constraint</th>
      <th>Default</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>TSource</td>
      <td></td>
      <td></td>
      <td>Source object type passed to resolvers.</td>
    </tr>
    <tr>
      <td>TContext</td>
      <td></td>
      <td></td>
      <td>Context object type passed to resolvers.</td>
    </tr>
    <tr>
      <td>TArgs</td>
      <td></td>
      <td><ApiType parts={[["keyword", "any"]]} /></td>
      <td>Argument object type passed to resolvers.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Members</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>name</td>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The GraphQL name for this schema element.</td>
    </tr>
    <tr>
      <td>description</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Human-readable description for this schema element, if provided.</td>
    </tr>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["link", "GraphQLOutputType", "/api-v16/type#graphqloutputtype"]]} /></td>
      <td>The GraphQL type reference or runtime type for this element.</td>
    </tr>
    <tr>
      <td>args</td>
      <td><ApiType parts={[["keyword", "readonly"], " ", ["link", "GraphQLArgument", "/api-v16/type#graphqlargument"], "[]"]} /></td>
      <td>Arguments accepted by this field or directive.</td>
    </tr>
    <tr>
      <td>resolve?</td>
      <td><ApiType parts={[["link", "GraphQLFieldResolver", "/api-v16/type#graphqlfieldresolver"], "\u003c\n  ", ["type", "TSource"], ",\n  ", ["type", "TContext"], ",\n  ", ["type", "TArgs"], "\n\u003e"]} /></td>
      <td>Resolver function used to produce this field value.</td>
    </tr>
    <tr>
      <td>subscribe?</td>
      <td><ApiType parts={[["link", "GraphQLFieldResolver", "/api-v16/type#graphqlfieldresolver"], "\u003c\n  ", ["type", "TSource"], ",\n  ", ["type", "TContext"], ",\n  ", ["type", "TArgs"], "\n\u003e"]} /></td>
      <td>Resolver function used to create a subscription event stream for this field.</td>
    </tr>
    <tr>
      <td>deprecationReason</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Reason this element is deprecated, if one was provided.</td>
    </tr>
    <tr>
      <td>extensions</td>
      <td><ApiType parts={[["type", "Readonly"], "\u003c\n  ", ["link", "GraphQLFieldExtensions", "/api-v16/type#graphqlfieldextensions"], "\u003c\n    ", ["type", "TSource"], ",\n    ", ["type", "TContext"], ",\n    ", ["type", "TArgs"], "\n  \u003e\n\u003e"]} /></td>
      <td>Extension fields to include in the formatted result.</td>
    </tr>
    <tr>
      <td>astNode</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "FieldDefinitionNode", "/api-v16/language#fielddefinitionnode"], "\u003e"]} /></td>
      <td>AST node from which this schema element was built, if available.</td>
    </tr>
  </tbody>
</table>

<hr className="api-item-divider" />

#### GraphQLArgument

**Interface.** A resolved GraphQL argument definition.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Members</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>name</td>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The GraphQL name for this schema element.</td>
    </tr>
    <tr>
      <td>description</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Human-readable description for this schema element, if provided.</td>
    </tr>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["link", "GraphQLInputType", "/api-v16/type#graphqlinputtype"]]} /></td>
      <td>The GraphQL type reference or runtime type for this element.</td>
    </tr>
    <tr>
      <td>defaultValue</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>Default value used when no explicit value is supplied.</td>
    </tr>
    <tr>
      <td>deprecationReason</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Reason this element is deprecated, if one was provided.</td>
    </tr>
    <tr>
      <td>extensions</td>
      <td><ApiType parts={[["type", "Readonly"], "\u003c", ["link", "GraphQLArgumentExtensions", "/api-v16/type#graphqlargumentextensions"], "\u003e"]} /></td>
      <td>Extension fields to include in the formatted result.</td>
    </tr>
    <tr>
      <td>astNode</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "InputValueDefinitionNode", "/api-v16/language#inputvaluedefinitionnode"], "\u003e"]} /></td>
      <td>AST node from which this schema element was built, if available.</td>
    </tr>
  </tbody>
</table>

<hr className="api-item-divider" />

#### GraphQLFieldMap

**Type alias.** A map of field names to resolved field definitions.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type Parameters</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Constraint</th>
      <th>Default</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>TSource</td>
      <td></td>
      <td></td>
      <td>Source object type passed to resolvers.</td>
    </tr>
    <tr>
      <td>TContext</td>
      <td></td>
      <td></td>
      <td>Context object type passed to resolvers.</td>
    </tr>
  </tbody>
</table>

<ApiSignature parts={[["keyword", "type"], " ", ["name", "GraphQLFieldMap"], "\u003c", ["type", "TSource"], ", ", ["type", "TContext"], "\u003e =\n  ", ["type", "ObjMap"], "\u003c\n    ", ["link", "GraphQLField", "/api-v16/type#graphqlfield"], "\u003c", ["type", "TSource"], ", ", ["type", "TContext"], "\u003e\n  \u003e;"]} />

<hr className="api-item-divider" />

#### GraphQLInterfaceTypeExtensions

**Interface.** Custom extensions

**Remarks:** Use a unique identifier name for your extension, for example the name of
your library or project. Do not use a shortened identifier as this increases
the risk of conflicts. We recommend you add at most one extension field,
an object which can contain all the values you need.

<hr className="api-item-divider" />

#### GraphQLInterfaceTypeConfig

**Interface.** Configuration used to construct a GraphQLInterfaceType.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type Parameters</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Constraint</th>
      <th>Default</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>TSource</td>
      <td></td>
      <td></td>
      <td>Source object type passed to resolvers.</td>
    </tr>
    <tr>
      <td>TContext</td>
      <td></td>
      <td></td>
      <td>Context object type passed to resolvers.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Members</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>name</td>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The GraphQL name for this schema element.</td>
    </tr>
    <tr>
      <td>description?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Human-readable description for this schema element, if provided.</td>
    </tr>
    <tr>
      <td>interfaces?</td>
      <td><ApiType parts={[["link", "ThunkReadonlyArray", "/api-v16/type#thunkreadonlyarray"], "\u003c", ["link", "GraphQLInterfaceType", "/api-v16/type#graphqlinterfacetype"], "\u003e"]} /></td>
      <td>Interfaces implemented by this object or interface type.</td>
    </tr>
    <tr>
      <td>fields</td>
      <td><ApiType parts={[["link", "ThunkObjMap", "/api-v16/type#thunkobjmap"], "\u003c\n  ", ["link", "GraphQLFieldConfig", "/api-v16/type#graphqlfieldconfig"], "\u003c", ["type", "TSource"], ", ", ["type", "TContext"], "\u003e\n\u003e"]} /></td>
      <td>Fields declared by this object, interface, input object, or literal.</td>
    </tr>
    <tr>
      <td>resolveType?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c\n  ", ["link", "GraphQLTypeResolver", "/api-v16/type#graphqltyperesolver"], "\u003c", ["type", "TSource"], ", ", ["type", "TContext"], "\u003e\n\u003e"]} /></td>
      <td>Optionally provide a custom type resolver function. If one is not provided,<br />
the default implementation will call <code>{"isTypeOf"}</code> on each implementing<br />
Object type.</td>
    </tr>
    <tr>
      <td>extensions?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["type", "Readonly"], "\u003c", ["link", "GraphQLInterfaceTypeExtensions", "/api-v16/type#graphqlinterfacetypeextensions"], "\u003e\u003e"]} /></td>
      <td>Extension fields to include in the formatted result.</td>
    </tr>
    <tr>
      <td>astNode?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "InterfaceTypeDefinitionNode", "/api-v16/language#interfacetypedefinitionnode"], "\u003e"]} /></td>
      <td>AST node from which this schema element was built, if available.</td>
    </tr>
    <tr>
      <td>extensionASTNodes?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "readonly"], " ", ["link", "InterfaceTypeExtensionNode", "/api-v16/language#interfacetypeextensionnode"], "[]\u003e"]} /></td>
      <td>AST extension nodes applied to this schema element.</td>
    </tr>
  </tbody>
</table>

<hr className="api-item-divider" />

#### GraphQLUnionTypeExtensions

**Interface.** Custom extensions

**Remarks:** Use a unique identifier name for your extension, for example the name of
your library or project. Do not use a shortened identifier as this increases
the risk of conflicts. We recommend you add at most one extension field,
an object which can contain all the values you need.

<hr className="api-item-divider" />

#### GraphQLUnionTypeConfig

**Interface.** Configuration used to construct a GraphQLUnionType.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type Parameters</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Constraint</th>
      <th>Default</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>TSource</td>
      <td></td>
      <td></td>
      <td>Source object type passed to resolvers.</td>
    </tr>
    <tr>
      <td>TContext</td>
      <td></td>
      <td></td>
      <td>Context object type passed to resolvers.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Members</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>name</td>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The GraphQL name for this schema element.</td>
    </tr>
    <tr>
      <td>description?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Human-readable description for this schema element, if provided.</td>
    </tr>
    <tr>
      <td>types</td>
      <td><ApiType parts={[["link", "ThunkReadonlyArray", "/api-v16/type#thunkreadonlyarray"], "\u003c", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], "\u003e"]} /></td>
      <td>Object types that belong to this union type.</td>
    </tr>
    <tr>
      <td>resolveType?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c\n  ", ["link", "GraphQLTypeResolver", "/api-v16/type#graphqltyperesolver"], "\u003c", ["type", "TSource"], ", ", ["type", "TContext"], "\u003e\n\u003e"]} /></td>
      <td>Optionally provide a custom type resolver function. If one is not provided,<br />
the default implementation will call <code>{"isTypeOf"}</code> on each implementing<br />
Object type.</td>
    </tr>
    <tr>
      <td>extensions?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["type", "Readonly"], "\u003c", ["link", "GraphQLUnionTypeExtensions", "/api-v16/type#graphqluniontypeextensions"], "\u003e\u003e"]} /></td>
      <td>Extension fields to include in the formatted result.</td>
    </tr>
    <tr>
      <td>astNode?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "UnionTypeDefinitionNode", "/api-v16/language#uniontypedefinitionnode"], "\u003e"]} /></td>
      <td>AST node from which this schema element was built, if available.</td>
    </tr>
    <tr>
      <td>extensionASTNodes?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "readonly"], " ", ["link", "UnionTypeExtensionNode", "/api-v16/language#uniontypeextensionnode"], "[]\u003e"]} /></td>
      <td>AST extension nodes applied to this schema element.</td>
    </tr>
  </tbody>
</table>

<hr className="api-item-divider" />

#### GraphQLEnumTypeExtensions

**Interface.** Custom extensions

**Remarks:** Use a unique identifier name for your extension, for example the name of
your library or project. Do not use a shortened identifier as this increases
the risk of conflicts. We recommend you add at most one extension field,
an object which can contain all the values you need.

<hr className="api-item-divider" />

#### GraphQLEnumTypeConfig

**Interface.** Configuration used to construct a GraphQLEnumType.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Members</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>name</td>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The GraphQL name for this schema element.</td>
    </tr>
    <tr>
      <td>description?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Human-readable description for this schema element, if provided.</td>
    </tr>
    <tr>
      <td>values</td>
      <td><ApiType parts={[["link", "ThunkObjMap", "/api-v16/type#thunkobjmap"], "\u003c", ["link", "GraphQLEnumValueConfig", "/api-v16/type#graphqlenumvalueconfig"], "\u003e"]} /></td>
      <td>Values contained in this enum, list, or input-object definition.</td>
    </tr>
    <tr>
      <td>extensions?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["type", "Readonly"], "\u003c", ["link", "GraphQLEnumTypeExtensions", "/api-v16/type#graphqlenumtypeextensions"], "\u003e\u003e"]} /></td>
      <td>Extension fields to include in the formatted result.</td>
    </tr>
    <tr>
      <td>astNode?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "EnumTypeDefinitionNode", "/api-v16/language#enumtypedefinitionnode"], "\u003e"]} /></td>
      <td>AST node from which this schema element was built, if available.</td>
    </tr>
    <tr>
      <td>extensionASTNodes?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "readonly"], " ", ["link", "EnumTypeExtensionNode", "/api-v16/language#enumtypeextensionnode"], "[]\u003e"]} /></td>
      <td>AST extension nodes applied to this schema element.</td>
    </tr>
  </tbody>
</table>

<hr className="api-item-divider" />

#### GraphQLEnumValueConfigMap

**Type alias.** A map of enum value names to enum value configuration objects.

<ApiSignature parts={[["keyword", "type"], " ", ["name", "GraphQLEnumValueConfigMap"], " = ", ["type", "ObjMap"], "\u003c", ["link", "GraphQLEnumValueConfig", "/api-v16/type#graphqlenumvalueconfig"], "\u003e;"]} />

<hr className="api-item-divider" />

#### GraphQLEnumValueExtensions

**Interface.** Custom extensions

**Remarks:** Use a unique identifier name for your extension, for example the name of
your library or project. Do not use a shortened identifier as this increases
the risk of conflicts. We recommend you add at most one extension field,
an object which can contain all the values you need.

<hr className="api-item-divider" />

#### GraphQLEnumValueConfig

**Interface.** Configuration used to define a GraphQL enum value.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Members</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>description?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Human-readable description for this schema element, if provided.</td>
    </tr>
    <tr>
      <td>value?</td>
      <td><ApiType parts={[["keyword", "any"]]} /></td>
      <td>Parsed value represented by this node.</td>
    </tr>
    <tr>
      <td>deprecationReason?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Reason this element is deprecated, if one was provided.</td>
    </tr>
    <tr>
      <td>extensions?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["type", "Readonly"], "\u003c", ["link", "GraphQLEnumValueExtensions", "/api-v16/type#graphqlenumvalueextensions"], "\u003e\u003e"]} /></td>
      <td>Extension fields to include in the formatted result.</td>
    </tr>
    <tr>
      <td>astNode?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "EnumValueDefinitionNode", "/api-v16/language#enumvaluedefinitionnode"], "\u003e"]} /></td>
      <td>AST node from which this schema element was built, if available.</td>
    </tr>
  </tbody>
</table>

<hr className="api-item-divider" />

#### GraphQLEnumValue

**Interface.** A resolved GraphQL enum value definition.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Members</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>name</td>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The GraphQL name for this schema element.</td>
    </tr>
    <tr>
      <td>description</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Human-readable description for this schema element, if provided.</td>
    </tr>
    <tr>
      <td>value</td>
      <td><ApiType parts={[["keyword", "any"]]} /></td>
      <td>Parsed value represented by this node.</td>
    </tr>
    <tr>
      <td>deprecationReason</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Reason this element is deprecated, if one was provided.</td>
    </tr>
    <tr>
      <td>extensions</td>
      <td><ApiType parts={[["type", "Readonly"], "\u003c", ["link", "GraphQLEnumValueExtensions", "/api-v16/type#graphqlenumvalueextensions"], "\u003e"]} /></td>
      <td>Extension fields to include in the formatted result.</td>
    </tr>
    <tr>
      <td>astNode</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "EnumValueDefinitionNode", "/api-v16/language#enumvaluedefinitionnode"], "\u003e"]} /></td>
      <td>AST node from which this schema element was built, if available.</td>
    </tr>
  </tbody>
</table>

<hr className="api-item-divider" />

#### GraphQLInputObjectTypeExtensions

**Interface.** Custom extensions

**Remarks:** Use a unique identifier name for your extension, for example the name of
your library or project. Do not use a shortened identifier as this increases
the risk of conflicts. We recommend you add at most one extension field,
an object which can contain all the values you need.

<hr className="api-item-divider" />

#### GraphQLInputObjectTypeConfig

**Interface.** Configuration used to construct a GraphQLInputObjectType.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Members</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>name</td>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The GraphQL name for this schema element.</td>
    </tr>
    <tr>
      <td>description?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Human-readable description for this schema element, if provided.</td>
    </tr>
    <tr>
      <td>fields</td>
      <td><ApiType parts={[["link", "ThunkObjMap", "/api-v16/type#thunkobjmap"], "\u003c", ["link", "GraphQLInputFieldConfig", "/api-v16/type#graphqlinputfieldconfig"], "\u003e"]} /></td>
      <td>Fields declared by this object, interface, input object, or literal.</td>
    </tr>
    <tr>
      <td>extensions?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["type", "Readonly"], "\u003c", ["link", "GraphQLInputObjectTypeExtensions", "/api-v16/type#graphqlinputobjecttypeextensions"], "\u003e\u003e"]} /></td>
      <td>Extension fields to include in the formatted result.</td>
    </tr>
    <tr>
      <td>astNode?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "InputObjectTypeDefinitionNode", "/api-v16/language#inputobjecttypedefinitionnode"], "\u003e"]} /></td>
      <td>AST node from which this schema element was built, if available.</td>
    </tr>
    <tr>
      <td>extensionASTNodes?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "readonly"], " ", ["link", "InputObjectTypeExtensionNode", "/api-v16/language#inputobjecttypeextensionnode"], "[]\u003e"]} /></td>
      <td>AST extension nodes applied to this schema element.</td>
    </tr>
    <tr>
      <td>isOneOf?</td>
      <td><ApiType parts={[["keyword", "boolean"]]} /></td>
      <td>Whether this input object uses the experimental OneOf input object semantics.</td>
    </tr>
  </tbody>
</table>

<hr className="api-item-divider" />

#### GraphQLInputFieldExtensions

**Interface.** Custom extensions

**Remarks:** Use a unique identifier name for your extension, for example the name of
your library or project. Do not use a shortened identifier as this increases
the risk of conflicts. We recommend you add at most one extension field,
an object which can contain all the values you need.

<hr className="api-item-divider" />

#### GraphQLInputFieldConfig

**Interface.** Configuration used to define a GraphQL input field.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Members</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>description?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Human-readable description for this schema element, if provided.</td>
    </tr>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["link", "GraphQLInputType", "/api-v16/type#graphqlinputtype"]]} /></td>
      <td>The GraphQL type reference or runtime type for this element.</td>
    </tr>
    <tr>
      <td>defaultValue?</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>Default value used when no explicit value is supplied.</td>
    </tr>
    <tr>
      <td>deprecationReason?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Reason this element is deprecated, if one was provided.</td>
    </tr>
    <tr>
      <td>extensions?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["type", "Readonly"], "\u003c", ["link", "GraphQLInputFieldExtensions", "/api-v16/type#graphqlinputfieldextensions"], "\u003e\u003e"]} /></td>
      <td>Extension fields to include in the formatted result.</td>
    </tr>
    <tr>
      <td>astNode?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "InputValueDefinitionNode", "/api-v16/language#inputvaluedefinitionnode"], "\u003e"]} /></td>
      <td>AST node from which this schema element was built, if available.</td>
    </tr>
  </tbody>
</table>

<hr className="api-item-divider" />

#### GraphQLInputFieldConfigMap

**Type alias.** A map of input field names to input field configuration objects.

<ApiSignature parts={[["keyword", "type"], " ", ["name", "GraphQLInputFieldConfigMap"], " = ", ["type", "ObjMap"], "\u003c", ["link", "GraphQLInputFieldConfig", "/api-v16/type#graphqlinputfieldconfig"], "\u003e;"]} />

<hr className="api-item-divider" />

#### GraphQLInputField

**Interface.** A resolved GraphQL input field definition.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Members</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>name</td>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The GraphQL name for this schema element.</td>
    </tr>
    <tr>
      <td>description</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Human-readable description for this schema element, if provided.</td>
    </tr>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["link", "GraphQLInputType", "/api-v16/type#graphqlinputtype"]]} /></td>
      <td>The GraphQL type reference or runtime type for this element.</td>
    </tr>
    <tr>
      <td>defaultValue</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>Default value used when no explicit value is supplied.</td>
    </tr>
    <tr>
      <td>deprecationReason</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Reason this element is deprecated, if one was provided.</td>
    </tr>
    <tr>
      <td>extensions</td>
      <td><ApiType parts={[["type", "Readonly"], "\u003c", ["link", "GraphQLInputFieldExtensions", "/api-v16/type#graphqlinputfieldextensions"], "\u003e"]} /></td>
      <td>Extension fields to include in the formatted result.</td>
    </tr>
    <tr>
      <td>astNode</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "InputValueDefinitionNode", "/api-v16/language#inputvaluedefinitionnode"], "\u003e"]} /></td>
      <td>AST node from which this schema element was built, if available.</td>
    </tr>
  </tbody>
</table>

<hr className="api-item-divider" />

#### GraphQLInputFieldMap

**Type alias.** A map of input field names to resolved input field definitions.

<ApiSignature parts={[["keyword", "type"], " ", ["name", "GraphQLInputFieldMap"], " = ", ["type", "ObjMap"], "\u003c", ["link", "GraphQLInputField", "/api-v16/type#graphqlinputfield"], "\u003e;"]} />

## Category: Directives

<div className="api-category-toc">
  <p>
    <strong>Classes:</strong><br />
    <a href="/api-v16/type#graphqldirective">GraphQLDirective</a>
  </p>
  <p>
    <strong>Functions:</strong><br />
    <a href="/api-v16/type#isdirective">isDirective()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#assertdirective">assertDirective()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#isspecifieddirective">isSpecifiedDirective()</a>
  </p>
  <p>
    <strong>Constants:</strong><br />
    <a href="/api-v16/type#graphqlincludedirective">GraphQLIncludeDirective</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlskipdirective">GraphQLSkipDirective</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#default_deprecation_reason">DEFAULT_DEPRECATION_REASON</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqldeprecateddirective">GraphQLDeprecatedDirective</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlspecifiedbydirective">GraphQLSpecifiedByDirective</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqloneofdirective">GraphQLOneOfDirective</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#specifieddirectives">specifiedDirectives</a>
  </p>
  <p>
    <strong>Types:</strong><br />
    <a href="/api-v16/type#graphqldirectiveextensions">GraphQLDirectiveExtensions</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqldirectiveconfig">GraphQLDirectiveConfig</a>
  </p>
</div>

### Classes

#### GraphQLDirective

Directives are used by the GraphQL runtime as a way of modifying execution
behavior. Type system creators will usually not create these directly.

<hr className="api-subsection-divider" />

##### Constructor

Creates a GraphQLDirective instance.

**Signature:**

<ApiSignature parts={[["keyword", "new"], " ", ["name", "GraphQLDirective"], "(", ["parameter", "config"], ": ", ["type", "Readonly"], "\u003c", ["link", "GraphQLDirectiveConfig", "/api-v16/type#graphqldirectiveconfig"], "\u003e);"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>config</td>
      <td><ApiType parts={[["type", "Readonly"], "\u003c", ["link", "GraphQLDirectiveConfig", "/api-v16/type#graphqldirectiveconfig"], "\u003e"]} /></td>
      <td>Configuration describing this object.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

##### Members

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>name</td>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The GraphQL name for this schema element.</td>
    </tr>
    <tr>
      <td>description</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Human-readable description for this schema element, if provided.</td>
    </tr>
    <tr>
      <td>locations</td>
      <td><ApiType parts={[["keyword", "readonly"], " ", ["link", "DirectiveLocation", "/api-v16/language#directivelocation"], "[]"]} /></td>
      <td>Locations where this directive may be applied.</td>
    </tr>
    <tr>
      <td>args</td>
      <td><ApiType parts={[["keyword", "readonly"], " ", ["link", "GraphQLArgument", "/api-v16/type#graphqlargument"], "[]"]} /></td>
      <td>Arguments accepted by this field or directive.</td>
    </tr>
    <tr>
      <td>isRepeatable</td>
      <td><ApiType parts={[["keyword", "boolean"]]} /></td>
      <td>Whether this directive may appear more than once at the same location.</td>
    </tr>
    <tr>
      <td>deprecationReason</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Reason this element is deprecated, if one was provided.</td>
    </tr>
    <tr>
      <td>extensions</td>
      <td><ApiType parts={[["type", "Readonly"], "\u003c", ["link", "GraphQLDirectiveExtensions", "/api-v16/type#graphqldirectiveextensions"], "\u003e"]} /></td>
      <td>Extension fields to include in the formatted result.</td>
    </tr>
    <tr>
      <td>astNode</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "DirectiveDefinitionNode", "/api-v16/language#directivedefinitionnode"], "\u003e"]} /></td>
      <td>AST node from which this schema element was built, if available.</td>
    </tr>
    <tr>
      <td>extensionASTNodes</td>
      <td><ApiType parts={[["keyword", "readonly"], " ", ["link", "DirectiveExtensionNode", "/api-v16/language#directiveextensionnode"], "[]"]} /></td>
      <td>AST extension nodes applied to this schema element.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

##### toConfig()

Returns a normalized configuration object for this object.

**Signature:**

<ApiSignature parts={[["name", "toConfig"], "(): \u007b\n  ", ["property", "args"], ": ", ["link", "GraphQLFieldConfigArgumentMap", "/api-v16/type#graphqlfieldconfigargumentmap"], ";\n  ", ["property", "isRepeatable"], ": ", ["keyword", "boolean"], ";\n  ", ["property", "extensions"], ": ", ["type", "Readonly"], "\u003c", ["link", "GraphQLDirectiveExtensions", "/api-v16/type#graphqldirectiveextensions"], "\u003e;\n  ", ["property", "extensionASTNodes"], ": ", ["type", "ReadonlyArray"], "\u003c", ["link", "DirectiveExtensionNode", "/api-v16/language#directiveextensionnode"], "\u003e;\n\u007d;"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={["\u007b\n  ", ["property", "args"], ": ", ["link", "GraphQLFieldConfigArgumentMap", "/api-v16/type#graphqlfieldconfigargumentmap"], ";\n  ", ["property", "isRepeatable"], ": ", ["keyword", "boolean"], ";\n  ", ["property", "extensions"], ": ", ["type", "Readonly"], "\u003c", ["link", "GraphQLDirectiveExtensions", "/api-v16/type#graphqldirectiveextensions"], "\u003e;\n  ", ["property", "extensionASTNodes"], ": ", ["type", "ReadonlyArray"], "\u003c", ["link", "DirectiveExtensionNode", "/api-v16/language#directiveextensionnode"], "\u003e;\n\u007d"]} /></td>
      <td>A configuration object that can be used to recreate this object.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { DirectiveLocation } from 'graphql/language';
import { GraphQLDirective, GraphQLString } from 'graphql/type';

const tag = new GraphQLDirective({
  name: 'tag',
  locations: [DirectiveLocation.FIELD_DEFINITION],
  args: {
    name: { type: GraphQLString },
  },
});

const config = tag.toConfig();
const tagCopy = new GraphQLDirective(config);

config.args.name.type; // => GraphQLString
tagCopy.args[0].name; // => 'name'
```

<hr className="api-subsection-divider" />

##### toString()

Returns the schema coordinate identifying this directive.

**Signature:**

<ApiSignature parts={[["name", "toString"], "(): ", ["keyword", "string"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The directive schema coordinate.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { DirectiveLocation } from 'graphql/language';
import { GraphQLDirective } from 'graphql/type';

const tag = new GraphQLDirective({
  name: 'tag',
  locations: [DirectiveLocation.FIELD_DEFINITION],
});

tag.toString(); // => '@tag'
```

<hr className="api-subsection-divider" />

##### toJSON()

Returns the JSON representation used when this object is serialized.

**Signature:**

<ApiSignature parts={[["name", "toJSON"], "(): ", ["keyword", "string"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The JSON-serializable representation.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { DirectiveLocation } from 'graphql/language';
import { GraphQLDirective } from 'graphql/type';

const tag = new GraphQLDirective({
  name: 'tag',
  locations: [DirectiveLocation.FIELD_DEFINITION],
});

tag.toJSON(); // => '@tag'
JSON.stringify({ directive: tag }); // => '{"directive":"@tag"}'
```

### Functions

#### isDirective()

Test if the given value is a GraphQL directive.

**Signature:**

<ApiSignature parts={[["name", "isDirective"], "(\n  ", ["parameter", "directive"], ": ", ["keyword", "unknown"], ",\n): ", ["parameter", "directive"], " ", ["keyword", "is"], " ", ["link", "GraphQLDirective", "/api-v16/type#graphqldirective"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>directive</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>Value to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["parameter", "directive"], " ", ["keyword", "is"], " ", ["link", "GraphQLDirective", "/api-v16/type#graphqldirective"]]} /></td>
      <td>True when the value is a GraphQLDirective.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { DirectiveLocation } from 'graphql/language';
import { GraphQLDirective, GraphQLString, isDirective } from 'graphql/type';

const upper = new GraphQLDirective({
  name: 'upper',
  locations: [DirectiveLocation.FIELD_DEFINITION],
});

isDirective(upper); // => true
isDirective(GraphQLString); // => false
```

<hr className="api-item-divider" />

#### assertDirective()

Returns the value as a GraphQLDirective, or throws if it is not a directive.

**Signature:**

<ApiSignature parts={[["name", "assertDirective"], "(", ["parameter", "directive"], ": ", ["keyword", "unknown"], "): ", ["link", "GraphQLDirective", "/api-v16/type#graphqldirective"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>directive</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>Value to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["link", "GraphQLDirective", "/api-v16/type#graphqldirective"]]} /></td>
      <td>The value typed as a GraphQLDirective.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { DirectiveLocation } from 'graphql/language';
import { assertDirective, GraphQLDirective, GraphQLString } from 'graphql/type';

const upper = new GraphQLDirective({
  name: 'upper',
  locations: [DirectiveLocation.FIELD_DEFINITION],
});

assertDirective(upper); // => upper
assertDirective(GraphQLString); // throws an error
```

<hr className="api-item-divider" />

#### isSpecifiedDirective()

Returns true when the directive is one of the directives specified by GraphQL.

**Signature:**

<ApiSignature parts={[["name", "isSpecifiedDirective"], "(", ["parameter", "directive"], ": ", ["link", "GraphQLDirective", "/api-v16/type#graphqldirective"], "): ", ["keyword", "boolean"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>directive</td>
      <td><ApiType parts={[["link", "GraphQLDirective", "/api-v16/type#graphqldirective"]]} /></td>
      <td>Directive to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "boolean"]]} /></td>
      <td>True when the directive is specified by GraphQL.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import {
  GraphQLDirective,
  GraphQLIncludeDirective,
  isSpecifiedDirective,
} from 'graphql/type';
import { DirectiveLocation } from 'graphql/language';

const customDirective = new GraphQLDirective({
  name: 'auth',
  locations: [DirectiveLocation.FIELD_DEFINITION],
});

isSpecifiedDirective(GraphQLIncludeDirective); // => true
isSpecifiedDirective(customDirective); // => false
```

### Constants

#### GraphQLIncludeDirective

Used to conditionally include fields or fragments.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type</div>

<ApiType parts={[["link", "GraphQLDirective", "/api-v16/type#graphqldirective"]]} />

<hr className="api-item-divider" />

#### GraphQLSkipDirective

Used to conditionally skip (exclude) fields or fragments.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type</div>

<ApiType parts={[["link", "GraphQLDirective", "/api-v16/type#graphqldirective"]]} />

<hr className="api-item-divider" />

#### DEFAULT_DEPRECATION_REASON

Constant string used for default reason for a deprecation.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type</div>

<ApiType parts={[["literal", "'No longer supported'"]]} />

<hr className="api-item-divider" />

#### GraphQLDeprecatedDirective

Used to declare element of a GraphQL schema as deprecated.

The optional `reason` argument defaults to [`DEFAULT_DEPRECATION_REASON`](/api-v16/type#default_deprecation_reason).

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type</div>

<ApiType parts={[["link", "GraphQLDirective", "/api-v16/type#graphqldirective"]]} />

<hr className="api-item-divider" />

#### GraphQLSpecifiedByDirective

Used to provide a URL for specifying the behavior of custom scalar definitions.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type</div>

<ApiType parts={[["link", "GraphQLDirective", "/api-v16/type#graphqldirective"]]} />

<hr className="api-item-divider" />

#### GraphQLOneOfDirective

Used to indicate an Input Object is a OneOf Input Object.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type</div>

<ApiType parts={[["link", "GraphQLDirective", "/api-v16/type#graphqldirective"]]} />

<hr className="api-item-divider" />

#### specifiedDirectives

Full list of stable directives specified by GraphQL.js.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type</div>

<ApiType parts={[["type", "ReadonlyArray"], "\u003c", ["link", "GraphQLDirective", "/api-v16/type#graphqldirective"], "\u003e"]} />

### Types

#### GraphQLDirectiveExtensions

**Interface.** Custom extensions

**Remarks:** Use a unique identifier name for your extension, for example the name of
your library or project. Do not use a shortened identifier as this increases
the risk of conflicts. We recommend you add at most one extension field,
an object which can contain all the values you need.

<hr className="api-item-divider" />

#### GraphQLDirectiveConfig

**Interface.** Configuration used to construct a GraphQLDirective.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Members</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>name</td>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The GraphQL name for this schema element.</td>
    </tr>
    <tr>
      <td>description?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Human-readable description for this schema element, if provided.</td>
    </tr>
    <tr>
      <td>locations</td>
      <td><ApiType parts={[["keyword", "readonly"], " ", ["link", "DirectiveLocation", "/api-v16/language#directivelocation"], "[]"]} /></td>
      <td>Locations where this directive may be applied.</td>
    </tr>
    <tr>
      <td>args?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "GraphQLFieldConfigArgumentMap", "/api-v16/type#graphqlfieldconfigargumentmap"], "\u003e"]} /></td>
      <td>Arguments accepted by this field or directive.</td>
    </tr>
    <tr>
      <td>isRepeatable?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "boolean"], "\u003e"]} /></td>
      <td>Whether this directive may appear more than once at the same location.</td>
    </tr>
    <tr>
      <td>deprecationReason?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Reason this element is deprecated, if one was provided.</td>
    </tr>
    <tr>
      <td>extensions?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["type", "Readonly"], "\u003c", ["link", "GraphQLDirectiveExtensions", "/api-v16/type#graphqldirectiveextensions"], "\u003e\u003e"]} /></td>
      <td>Extension fields to include in the formatted result.</td>
    </tr>
    <tr>
      <td>astNode?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "DirectiveDefinitionNode", "/api-v16/language#directivedefinitionnode"], "\u003e"]} /></td>
      <td>AST node from which this schema element was built, if available.</td>
    </tr>
    <tr>
      <td>extensionASTNodes?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "readonly"], " ", ["link", "DirectiveExtensionNode", "/api-v16/language#directiveextensionnode"], "[]\u003e"]} /></td>
      <td>AST extension nodes applied to this schema element.</td>
    </tr>
  </tbody>
</table>

## Category: Introspection

<div className="api-category-toc">
  <p>
    <strong>Functions:</strong><br />
    <a href="/api-v16/type#isintrospectiontype">isIntrospectionType()</a>
  </p>
  <p>
    <strong>Constants:</strong><br />
    <a href="/api-v16/type#__schema">__Schema</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#__directive">__Directive</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#__directivelocation">__DirectiveLocation</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#__type">__Type</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#__field">__Field</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#__inputvalue">__InputValue</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#__enumvalue">__EnumValue</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#__typekind">__TypeKind</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#schemametafielddef">SchemaMetaFieldDef</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#typemetafielddef">TypeMetaFieldDef</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#typenamemetafielddef">TypeNameMetaFieldDef</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#introspectiontypes">introspectionTypes</a>
  </p>
  <p>
    <strong>Enumerations:</strong><br />
    <a href="/api-v16/type#typekind">TypeKind</a>
  </p>
</div>

### Functions

#### isIntrospectionType()

Returns true when the type is one of the built-in introspection types.

**Signature:**

<ApiSignature parts={[["name", "isIntrospectionType"], "(", ["parameter", "type"], ": ", ["link", "GraphQLNamedType", "/api-v16/type#graphqlnamedtype"], "): ", ["keyword", "boolean"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["link", "GraphQLNamedType", "/api-v16/type#graphqlnamedtype"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "boolean"]]} /></td>
      <td>True when the type is one of the built-in introspection types.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { GraphQLString, isIntrospectionType, __Type } from 'graphql/type';

isIntrospectionType(__Type); // => true
isIntrospectionType(GraphQLString); // => false
```

### Constants

#### __Schema

The introspection type describing a GraphQL schema.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type</div>

<ApiType parts={[["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"]]} />

<hr className="api-item-divider" />

#### __Directive

The introspection type describing a GraphQL directive.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type</div>

<ApiType parts={[["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"]]} />

<hr className="api-item-divider" />

#### __DirectiveLocation

The introspection enum describing directive locations.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type</div>

<ApiType parts={[["link", "GraphQLEnumType", "/api-v16/type#graphqlenumtype"]]} />

<hr className="api-item-divider" />

#### __Type

The introspection type describing GraphQL types.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type</div>

<ApiType parts={[["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"]]} />

<hr className="api-item-divider" />

#### __Field

The introspection type describing object and interface fields.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type</div>

<ApiType parts={[["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"]]} />

<hr className="api-item-divider" />

#### __InputValue

The introspection type describing arguments and input fields.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type</div>

<ApiType parts={[["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"]]} />

<hr className="api-item-divider" />

#### __EnumValue

The introspection type describing enum values.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type</div>

<ApiType parts={[["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"]]} />

<hr className="api-item-divider" />

#### __TypeKind

The introspection enum describing GraphQL type kinds.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type</div>

<ApiType parts={[["link", "GraphQLEnumType", "/api-v16/type#graphqlenumtype"]]} />

<hr className="api-item-divider" />

#### SchemaMetaFieldDef

Note that these are GraphQLField and not GraphQLFieldConfig,
so the format for args is different.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type</div>

<ApiType parts={[["link", "GraphQLField", "/api-v16/type#graphqlfield"], "\u003c", ["keyword", "unknown"], ", ", ["keyword", "unknown"], "\u003e"]} />

<hr className="api-item-divider" />

#### TypeMetaFieldDef

The `__type` meta field definition used by introspection.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type</div>

<ApiType parts={[["link", "GraphQLField", "/api-v16/type#graphqlfield"], "\u003c", ["keyword", "unknown"], ", ", ["keyword", "unknown"], "\u003e"]} />

<hr className="api-item-divider" />

#### TypeNameMetaFieldDef

The `__typename` meta field definition used by execution and introspection.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type</div>

<ApiType parts={[["link", "GraphQLField", "/api-v16/type#graphqlfield"], "\u003c", ["keyword", "unknown"], ", ", ["keyword", "unknown"], "\u003e"]} />

<hr className="api-item-divider" />

#### introspectionTypes

All introspection types defined by the GraphQL specification.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type</div>

<ApiType parts={[["type", "ReadonlyArray"], "\u003c", ["link", "GraphQLNamedType", "/api-v16/type#graphqlnamedtype"], "\u003e"]} />

### Enumerations

#### TypeKind

**Enumeration.** The introspection enum describing the different kinds of GraphQL types.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Members</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Value</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code>{"SCALAR"}</code></td>
      <td><code>{"\"SCALAR\""}</code></td>
      <td>A scalar type.</td>
    </tr>
    <tr>
      <td><code>{"OBJECT"}</code></td>
      <td><code>{"\"OBJECT\""}</code></td>
      <td>An object type.</td>
    </tr>
    <tr>
      <td><code>{"INTERFACE"}</code></td>
      <td><code>{"\"INTERFACE\""}</code></td>
      <td>An interface type.</td>
    </tr>
    <tr>
      <td><code>{"UNION"}</code></td>
      <td><code>{"\"UNION\""}</code></td>
      <td>A union type.</td>
    </tr>
    <tr>
      <td><code>{"ENUM"}</code></td>
      <td><code>{"\"ENUM\""}</code></td>
      <td>An enum type.</td>
    </tr>
    <tr>
      <td><code>{"INPUT_OBJECT"}</code></td>
      <td><code>{"\"INPUT_OBJECT\""}</code></td>
      <td>An input object type.</td>
    </tr>
    <tr>
      <td><code>{"LIST"}</code></td>
      <td><code>{"\"LIST\""}</code></td>
      <td>A list wrapper type.</td>
    </tr>
    <tr>
      <td><code>{"NON_NULL"}</code></td>
      <td><code>{"\"NON_NULL\""}</code></td>
      <td>A non-null wrapper type.</td>
    </tr>
  </tbody>
</table>

## Category: Scalars

<div className="api-category-toc">
  <p>
    <strong>Functions:</strong><br />
    <a href="/api-v16/type#isspecifiedscalartype">isSpecifiedScalarType()</a>
  </p>
  <p>
    <strong>Constants:</strong><br />
    <a href="/api-v16/type#graphql_max_int">GRAPHQL_MAX_INT</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphql_min_int">GRAPHQL_MIN_INT</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlint">GraphQLInt</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlfloat">GraphQLFloat</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlstring">GraphQLString</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlboolean">GraphQLBoolean</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlid">GraphQLID</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#specifiedscalartypes">specifiedScalarTypes</a>
  </p>
</div>

### Functions

#### isSpecifiedScalarType()

Returns true when the scalar type is one of the scalars specified by GraphQL.

**Signature:**

<ApiSignature parts={[["name", "isSpecifiedScalarType"], "(", ["parameter", "type"], ": ", ["link", "GraphQLNamedType", "/api-v16/type#graphqlnamedtype"], "): ", ["keyword", "boolean"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>type</td>
      <td><ApiType parts={[["link", "GraphQLNamedType", "/api-v16/type#graphqlnamedtype"]]} /></td>
      <td>The GraphQL type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "boolean"]]} /></td>
      <td>True when the scalar type is one of the scalars specified by GraphQL.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import {
  GraphQLScalarType,
  GraphQLString,
  isSpecifiedScalarType,
} from 'graphql/type';

const DateTime = new GraphQLScalarType({
  name: 'DateTime',
});

isSpecifiedScalarType(GraphQLString); // => true
isSpecifiedScalarType(DateTime); // => false
```

### Constants

#### GRAPHQL_MAX_INT

Maximum possible Int value as per GraphQL Spec (32-bit signed integer).
n.b. This differs from JavaScript's numbers that are IEEE 754 doubles safe up-to 2^53 - 1

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type</div>

<ApiType parts={[["literal", "2147483647"]]} />

<hr className="api-item-divider" />

#### GRAPHQL_MIN_INT

Minimum possible Int value as per GraphQL Spec (32-bit signed integer).
n.b. This differs from JavaScript's numbers that are IEEE 754 doubles safe starting at -(2^53 - 1)

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type</div>

<ApiType parts={["-", ["literal", "2147483648"]]} />

<hr className="api-item-divider" />

#### GraphQLInt

The built-in `Int` scalar type.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type</div>

<ApiType parts={[["link", "GraphQLScalarType", "/api-v16/type#graphqlscalartype"], "\u003c", ["keyword", "number"], ", ", ["keyword", "number"], "\u003e"]} />

<hr className="api-item-divider" />

#### GraphQLFloat

The built-in `Float` scalar type.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type</div>

<ApiType parts={[["link", "GraphQLScalarType", "/api-v16/type#graphqlscalartype"], "\u003c", ["keyword", "number"], ", ", ["keyword", "number"], "\u003e"]} />

<hr className="api-item-divider" />

#### GraphQLString

The built-in `String` scalar type.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type</div>

<ApiType parts={[["link", "GraphQLScalarType", "/api-v16/type#graphqlscalartype"], "\u003c", ["keyword", "string"], ", ", ["keyword", "string"], "\u003e"]} />

<hr className="api-item-divider" />

#### GraphQLBoolean

The built-in `Boolean` scalar type.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type</div>

<ApiType parts={[["link", "GraphQLScalarType", "/api-v16/type#graphqlscalartype"], "\u003c", ["keyword", "boolean"], ", ", ["keyword", "boolean"], "\u003e"]} />

<hr className="api-item-divider" />

#### GraphQLID

The built-in `ID` scalar type.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type</div>

<ApiType parts={[["link", "GraphQLScalarType", "/api-v16/type#graphqlscalartype"], "\u003c", ["keyword", "string"], ", ", ["keyword", "string"], "\u003e"]} />

<hr className="api-item-divider" />

#### specifiedScalarTypes

All built-in scalar types defined by the GraphQL specification.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Type</div>

<ApiType parts={[["type", "ReadonlyArray"], "\u003c", ["link", "GraphQLScalarType", "/api-v16/type#graphqlscalartype"], "\u003e"]} />

## Category: Schema

<div className="api-category-toc">
  <p>
    <strong>Classes:</strong><br />
    <a href="/api-v16/type#graphqlschema">GraphQLSchema</a>
  </p>
  <p>
    <strong>Functions:</strong><br />
    <a href="/api-v16/type#isschema">isSchema()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#assertschema">assertSchema()</a>
  </p>
  <p>
    <strong>Types:</strong><br />
    <a href="/api-v16/type#graphqlschemaextensions">GraphQLSchemaExtensions</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#graphqlschemaconfig">GraphQLSchemaConfig</a>
  </p>
</div>

### Classes

#### GraphQLSchema

Schema Definition

A Schema is created by supplying the root types of each type of operation,
query and mutation (optional). A schema definition is then supplied to the
validator and executor.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example 1</div>

```ts
const MyAppQueryRootType = new GraphQLObjectType({
  name: 'Query',
  fields: {
    greeting: { type: GraphQLString },
  },
});

const MyAppMutationRootType = new GraphQLObjectType({
  name: 'Mutation',
  fields: {
    setGreeting: { type: GraphQLString },
  },
});

const MyAppSchema = new GraphQLSchema({
  query: MyAppQueryRootType,
  mutation: MyAppMutationRootType,
});
```

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example 2</div>

When the schema is constructed, by default only the types that are reachable
by traversing the root types are included, other types must be explicitly
referenced.

```ts
const characterInterface = new GraphQLInterfaceType({
  name: 'Character',
  fields: {
    name: { type: GraphQLString },
  },
});

const humanType = new GraphQLObjectType({
  name: 'Human',
  interfaces: [characterInterface],
  fields: {
    name: { type: GraphQLString },
  },
});

const droidType = new GraphQLObjectType({
  name: 'Droid',
  interfaces: [characterInterface],
  fields: {
    name: { type: GraphQLString },
  },
});

const schema = new GraphQLSchema({
  query: new GraphQLObjectType({
    name: 'Query',
    fields: {
      hero: { type: characterInterface },
    },
  }),
  // Since this schema references only the `Character` interface it's
  // necessary to explicitly list the types that implement it if
  // you want them to be included in the final schema.
  types: [humanType, droidType],
});
```

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example 3</div>

If an array of `directives` are provided to GraphQLSchema, that will be the
exact list of directives represented and allowed. If `directives` is not
provided then a default set of the specified directives (e.g. `@include` and
`@skip`) will be used. If you wish to provide *additional* directives to
these specified directives, you must explicitly declare them.

```ts
const MyAppSchema = new GraphQLSchema({
  query: MyAppQueryRootType,
  directives: specifiedDirectives.concat([myCustomDirective]),
});
```

<hr className="api-subsection-divider" />

##### Constructor

Creates a GraphQLSchema instance.

**Signature:**

<ApiSignature parts={[["keyword", "new"], " ", ["name", "GraphQLSchema"], "(", ["parameter", "config"], ": ", ["type", "Readonly"], "\u003c", ["link", "GraphQLSchemaConfig", "/api-v16/type#graphqlschemaconfig"], "\u003e);"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>config</td>
      <td><ApiType parts={[["type", "Readonly"], "\u003c", ["link", "GraphQLSchemaConfig", "/api-v16/type#graphqlschemaconfig"], "\u003e"]} /></td>
      <td>Configuration describing this object.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

##### Members

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>description</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Human-readable description for this schema element, if provided.</td>
    </tr>
    <tr>
      <td>extensions</td>
      <td><ApiType parts={[["type", "Readonly"], "\u003c", ["link", "GraphQLSchemaExtensions", "/api-v16/type#graphqlschemaextensions"], "\u003e"]} /></td>
      <td>Extension fields to include in the formatted result.</td>
    </tr>
    <tr>
      <td>astNode</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "SchemaDefinitionNode", "/api-v16/language#schemadefinitionnode"], "\u003e"]} /></td>
      <td>AST node from which this schema element was built, if available.</td>
    </tr>
    <tr>
      <td>extensionASTNodes</td>
      <td><ApiType parts={[["keyword", "readonly"], " ", ["link", "SchemaExtensionNode", "/api-v16/language#schemaextensionnode"], "[]"]} /></td>
      <td>AST extension nodes applied to this schema element.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

##### getQueryType()

Returns the root object type for query operations.

**Signature:**

<ApiSignature parts={[["name", "getQueryType"], "(): ", ["type", "Maybe"], "\u003c", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], "\u003e;"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], "\u003e"]} /></td>
      <td>The query root type, if this schema defines one.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';

const schema = buildSchema(`
  type Query {
    greeting: String
  }
`);

schema.getQueryType()?.name; // => 'Query'
```

<hr className="api-subsection-divider" />

##### getMutationType()

Returns the root object type for mutation operations.

**Signature:**

<ApiSignature parts={[["name", "getMutationType"], "(): ", ["type", "Maybe"], "\u003c", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], "\u003e;"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], "\u003e"]} /></td>
      <td>The mutation root type, if this schema defines one.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';

const schema = buildSchema(`
  type Query {
    greeting: String
  }

  type Mutation {
    setGreeting(value: String!): String
  }
`);

schema.getMutationType()?.name; // => 'Mutation'
```

<hr className="api-subsection-divider" />

##### getSubscriptionType()

Returns the root object type for subscription operations.

**Signature:**

<ApiSignature parts={[["name", "getSubscriptionType"], "(): ", ["type", "Maybe"], "\u003c", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], "\u003e;"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], "\u003e"]} /></td>
      <td>The subscription root type, if this schema defines one.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';

const schema = buildSchema(`
  type Query {
    greeting: String
  }

  type Subscription {
    greetings: String
  }
`);

schema.getSubscriptionType()?.name; // => 'Subscription'
```

<hr className="api-subsection-divider" />

##### getRootType()

Returns the root object type for the requested operation kind.

**Signature:**

<ApiSignature parts={[["name", "getRootType"], "(\n  ", ["parameter", "operation"], ": ", ["link", "OperationTypeNode", "/api-v16/language#operationtypenode"], ",\n): ", ["type", "Maybe"], "\u003c", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], "\u003e;"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>operation</td>
      <td><ApiType parts={[["link", "OperationTypeNode", "/api-v16/language#operationtypenode"]]} /></td>
      <td>Operation kind to resolve.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], "\u003e"]} /></td>
      <td>The root object type for the operation kind, if this schema defines one.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { OperationTypeNode } from 'graphql/language';
import { buildSchema } from 'graphql/utilities';

const schema = buildSchema(`
  type Query {
    greeting: String
  }

  type Mutation {
    setGreeting(value: String!): String
  }
`);

schema.getRootType(OperationTypeNode.QUERY)?.name; // => 'Query'
schema.getRootType(OperationTypeNode.MUTATION)?.name; // => 'Mutation'
schema.getRootType(OperationTypeNode.SUBSCRIPTION); // => undefined
```

<hr className="api-subsection-divider" />

##### getTypeMap()

Returns all named types known to this schema.

**Signature:**

<ApiSignature parts={[["name", "getTypeMap"], "(): ", ["type", "ObjMap"], "\u003c", ["link", "GraphQLNamedType", "/api-v16/type#graphqlnamedtype"], "\u003e;"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["type", "ObjMap"], "\u003c", ["link", "GraphQLNamedType", "/api-v16/type#graphqlnamedtype"], "\u003e"]} /></td>
      <td>A map of schema types keyed by type name.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';

const schema = buildSchema(`
  type User {
    name: String
  }

  type Query {
    viewer: User
  }
`);

const typeMap = schema.getTypeMap();

typeMap.User.name; // => 'User'
typeMap.Query.name; // => 'Query'
typeMap.String.name; // => 'String'
```

<hr className="api-subsection-divider" />

##### getType()

Returns the named type with the provided name.

**Signature:**

<ApiSignature parts={[["name", "getType"], "(\n  ", ["parameter", "name"], ": ", ["keyword", "string"], ",\n): ", ["link", "GraphQLNamedType", "/api-v16/type#graphqlnamedtype"], " \u007c ", ["keyword", "undefined"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>name</td>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The GraphQL name to look up.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["link", "GraphQLNamedType", "/api-v16/type#graphqlnamedtype"], " \u007c ", ["keyword", "undefined"]]} /></td>
      <td>The named schema type, if one exists.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';

const schema = buildSchema(`
  type User {
    name: String
  }

  type Query {
    viewer: User
  }
`);

schema.getType('User')?.toString(); // => 'User'
schema.getType('Missing'); // => undefined
```

<hr className="api-subsection-divider" />

##### getPossibleTypes()

Returns object types that may be returned for an abstract type.

**Signature:**

<ApiSignature parts={[["name", "getPossibleTypes"], "(\n  ", ["parameter", "abstractType"], ": ", ["link", "GraphQLAbstractType", "/api-v16/type#graphqlabstracttype"], ",\n): ", ["keyword", "readonly"], " ", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], "[];"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>abstractType</td>
      <td><ApiType parts={[["link", "GraphQLAbstractType", "/api-v16/type#graphqlabstracttype"]]} /></td>
      <td>Interface or union type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "readonly"], " ", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], "[]"]} /></td>
      <td>Object types that may satisfy the abstract type.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { assertInterfaceType, assertUnionType } from 'graphql/type';

const schema = buildSchema(`
  interface Node {
    id: ID!
  }

  type User implements Node {
    id: ID!
  }

  type Organization implements Node {
    id: ID!
  }

  union SearchResult = User | Organization

  type Query {
    node: Node
    search: [SearchResult]
  }
`);

const Node = assertInterfaceType(schema.getType('Node'));
const SearchResult = assertUnionType(schema.getType('SearchResult'));

schema.getPossibleTypes(Node).map((type) => type.name); // => ['User', 'Organization']
schema.getPossibleTypes(SearchResult).map((type) => type.name); // => ['User', 'Organization']
```

<hr className="api-subsection-divider" />

##### getImplementations()

Returns objects and interfaces that implement an interface type.

**Signature:**

<ApiSignature parts={[["name", "getImplementations"], "(", ["parameter", "interfaceType"], ": ", ["link", "GraphQLInterfaceType", "/api-v16/type#graphqlinterfacetype"], "): \u007b\n  ", ["property", "objects"], ": ", ["keyword", "readonly"], " ", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], "[];\n  ", ["property", "interfaces"], ": ", ["keyword", "readonly"], " ", ["link", "GraphQLInterfaceType", "/api-v16/type#graphqlinterfacetype"], "[];\n\u007d;"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>interfaceType</td>
      <td><ApiType parts={[["link", "GraphQLInterfaceType", "/api-v16/type#graphqlinterfacetype"]]} /></td>
      <td>Interface type to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={["\u007b\n  ", ["property", "objects"], ": ", ["keyword", "readonly"], " ", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], "[];\n  ", ["property", "interfaces"], ": ", ["keyword", "readonly"], " ", ["link", "GraphQLInterfaceType", "/api-v16/type#graphqlinterfacetype"], "[];\n\u007d"]} /></td>
      <td>Object and interface implementations of the interface.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { assertInterfaceType } from 'graphql/type';

const schema = buildSchema(`
  interface Resource {
    url: String!
  }

  interface Image implements Resource {
    url: String!
    width: Int
  }

  type Photo implements Resource & Image {
    url: String!
    width: Int
  }

  type Query {
    resource: Resource
  }
`);

const Resource = assertInterfaceType(schema.getType('Resource'));
const implementations = schema.getImplementations(Resource);

implementations.interfaces.map((type) => type.name); // => ['Image']
implementations.objects.map((type) => type.name); // => ['Photo']
```

<hr className="api-subsection-divider" />

##### isSubType()

Returns whether one type is a possible runtime subtype of an abstract type.

**Signature:**

<ApiSignature parts={[["name", "isSubType"], "(\n  ", ["parameter", "abstractType"], ": ", ["link", "GraphQLAbstractType", "/api-v16/type#graphqlabstracttype"], ",\n  ", ["parameter", "maybeSubType"], ": ", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], " \u007c ", ["link", "GraphQLInterfaceType", "/api-v16/type#graphqlinterfacetype"], ",\n): ", ["keyword", "boolean"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>abstractType</td>
      <td><ApiType parts={[["link", "GraphQLAbstractType", "/api-v16/type#graphqlabstracttype"]]} /></td>
      <td>Interface or union type to inspect.</td>
    </tr>
    <tr>
      <td>maybeSubType</td>
      <td><ApiType parts={[["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], " \u007c ", ["link", "GraphQLInterfaceType", "/api-v16/type#graphqlinterfacetype"]]} /></td>
      <td>Object or interface type to test as a possible subtype.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "boolean"]]} /></td>
      <td>True when the subtype may satisfy the abstract type.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { assertInterfaceType, assertObjectType } from 'graphql/type';

const schema = buildSchema(`
  interface Node {
    id: ID!
  }

  type User implements Node {
    id: ID!
  }

  type Review {
    body: String
  }

  type Query {
    node: Node
    review: Review
  }
`);

const Node = assertInterfaceType(schema.getType('Node'));
const User = assertObjectType(schema.getType('User'));
const Review = assertObjectType(schema.getType('Review'));

schema.isSubType(Node, User); // => true
schema.isSubType(Node, Review); // => false
```

<hr className="api-subsection-divider" />

##### getDirectives()

Returns directives available in this schema.

**Signature:**

<ApiSignature parts={[["name", "getDirectives"], "(): ", ["keyword", "readonly"], " ", ["link", "GraphQLDirective", "/api-v16/type#graphqldirective"], "[];"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "readonly"], " ", ["link", "GraphQLDirective", "/api-v16/type#graphqldirective"], "[]"]} /></td>
      <td>Directives available in this schema.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';

const schema = buildSchema(`
  directive @upper on FIELD_DEFINITION

  type Query {
    greeting: String @upper
  }
`);

schema.getDirectives().map((directive) => directive.name); // => ['include', 'skip', 'deprecated', 'specifiedBy', 'oneOf', 'upper']
```

<hr className="api-subsection-divider" />

##### getDirective()

Returns the current directive definition.

**Signature:**

<ApiSignature parts={[["name", "getDirective"], "(\n  ", ["parameter", "name"], ": ", ["keyword", "string"], ",\n): ", ["type", "Maybe"], "\u003c", ["link", "GraphQLDirective", "/api-v16/type#graphqldirective"], "\u003e;"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>name</td>
      <td><ApiType parts={[["keyword", "string"]]} /></td>
      <td>The GraphQL name to look up.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "GraphQLDirective", "/api-v16/type#graphqldirective"], "\u003e"]} /></td>
      <td>The current directive definition, if known.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';

const schema = buildSchema(`
  directive @upper on FIELD_DEFINITION

  type Query {
    greeting: String @upper
  }
`);

schema.getDirective('upper')?.name; // => 'upper'
schema.getDirective('missing'); // => undefined
```

<hr className="api-subsection-divider" />

##### toConfig()

Returns a normalized configuration object for this object.

The returned config preserves the original `assumeValid` flag so the schema
can be recreated with the same validation behavior.

**Signature:**

<ApiSignature parts={[["name", "toConfig"], "(): ", ["type", "GraphQLSchemaNormalizedConfig"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["type", "GraphQLSchemaNormalizedConfig"]]} /></td>
      <td>A configuration object that can be used to recreate this object.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { GraphQLSchema } from 'graphql/type';

const schema = buildSchema(`
  type Query {
    greeting: String
  }
`);

const config = schema.toConfig();
const schemaCopy = new GraphQLSchema(config);

config.query?.name; // => 'Query'
schemaCopy.getQueryType()?.name; // => 'Query'
```

### Functions

#### isSchema()

Test if the given value is a GraphQL schema.

**Signature:**

<ApiSignature parts={[["name", "isSchema"], "(\n  ", ["parameter", "schema"], ": ", ["keyword", "unknown"], ",\n): ", ["parameter", "schema"], " ", ["keyword", "is"], " ", ["link", "GraphQLSchema", "/api-v16/type#graphqlschema"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>schema</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>Value to inspect.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["parameter", "schema"], " ", ["keyword", "is"], " ", ["link", "GraphQLSchema", "/api-v16/type#graphqlschema"]]} /></td>
      <td>True when the value is a GraphQLSchema.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { GraphQLString, isSchema } from 'graphql/type';

const schema = buildSchema(`
  type Query {
    greeting: String
  }
`);

isSchema(schema); // => true
isSchema(GraphQLString); // => false
```

<hr className="api-item-divider" />

#### assertSchema()

Returns the value as a GraphQLSchema, or throws if it is not a schema.

**Signature:**

<ApiSignature parts={[["name", "assertSchema"], "(", ["parameter", "schema"], ": ", ["keyword", "unknown"], "): ", ["link", "GraphQLSchema", "/api-v16/type#graphqlschema"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>schema</td>
      <td><ApiType parts={[["keyword", "unknown"]]} /></td>
      <td>GraphQL schema to use.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["link", "GraphQLSchema", "/api-v16/type#graphqlschema"]]} /></td>
      <td>The value typed as a GraphQLSchema.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { buildSchema } from 'graphql/utilities';
import { assertSchema, GraphQLString } from 'graphql/type';

const schema = buildSchema(`
  type Query {
    greeting: String
  }
`);

assertSchema(schema); // => schema
assertSchema(GraphQLString); // throws an error
```

### Types

#### GraphQLSchemaExtensions

**Interface.** Custom extensions

**Remarks:** Use a unique identifier name for your extension, for example the name of
your library or project. Do not use a shortened identifier as this increases
the risk of conflicts. We recommend you add at most one extension field,
an object which can contain all the values you need.

<hr className="api-item-divider" />

#### GraphQLSchemaConfig

**Interface.** Configuration used to construct a GraphQLSchema.

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Members</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>description?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "string"], "\u003e"]} /></td>
      <td>Human-readable description for this schema element, if provided.</td>
    </tr>
    <tr>
      <td>query?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], "\u003e"]} /></td>
      <td>Root object type for query operations.</td>
    </tr>
    <tr>
      <td>mutation?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], "\u003e"]} /></td>
      <td>Root object type for mutation operations.</td>
    </tr>
    <tr>
      <td>subscription?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "GraphQLObjectType", "/api-v16/type#graphqlobjecttype"], "\u003e"]} /></td>
      <td>Root object type for subscription operations.</td>
    </tr>
    <tr>
      <td>types?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "readonly"], " ", ["link", "GraphQLNamedType", "/api-v16/type#graphqlnamedtype"], "[]\u003e"]} /></td>
      <td>Object types that belong to this union type.</td>
    </tr>
    <tr>
      <td>directives?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "readonly"], " ", ["link", "GraphQLDirective", "/api-v16/type#graphqldirective"], "[]\u003e"]} /></td>
      <td>Directives available in this schema or applied to this AST node.</td>
    </tr>
    <tr>
      <td>extensions?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["type", "Readonly"], "\u003c", ["link", "GraphQLSchemaExtensions", "/api-v16/type#graphqlschemaextensions"], "\u003e\u003e"]} /></td>
      <td>Extension fields to include in the formatted result.</td>
    </tr>
    <tr>
      <td>astNode?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["link", "SchemaDefinitionNode", "/api-v16/language#schemadefinitionnode"], "\u003e"]} /></td>
      <td>AST node from which this schema element was built, if available.</td>
    </tr>
    <tr>
      <td>extensionASTNodes?</td>
      <td><ApiType parts={[["type", "Maybe"], "\u003c", ["keyword", "readonly"], " ", ["link", "SchemaExtensionNode", "/api-v16/language#schemaextensionnode"], "[]\u003e"]} /></td>
      <td>AST extension nodes applied to this schema element.</td>
    </tr>
  </tbody>
</table>

## Category: Validation

<div className="api-category-toc">
  <p>
    <strong>Functions:</strong><br />
    <a href="/api-v16/type#validateschema">validateSchema()</a>
    <span aria-hidden="true">&middot;</span>
    <a href="/api-v16/type#assertvalidschema">assertValidSchema()</a>
  </p>
</div>

### Functions

#### validateSchema()

Implements the "Type Validation" sub-sections of the specification's
"Type System" section.

Validation runs synchronously, returning an array of encountered errors, or
an empty array if no errors were encountered and the Schema is valid.

**Signature:**

<ApiSignature parts={[["name", "validateSchema"], "(\n  ", ["parameter", "schema"], ": ", ["link", "GraphQLSchema", "/api-v16/type#graphqlschema"], ",\n): ", ["keyword", "readonly"], " ", ["link", "GraphQLError", "/api-v16/error#graphqlerror"], "[];"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>schema</td>
      <td><ApiType parts={[["link", "GraphQLSchema", "/api-v16/type#graphqlschema"]]} /></td>
      <td>GraphQL schema to use.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Returns</div>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><ApiType parts={[["keyword", "readonly"], " ", ["link", "GraphQLError", "/api-v16/error#graphqlerror"], "[]"]} /></td>
      <td>Schema validation errors, or an empty array when the schema is valid.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { validateSchema } from 'graphql/type';
import { buildSchema } from 'graphql/utilities';

const schema = buildSchema(`
  type Query {
    name: String
  }
`);
const errors = validateSchema(schema);

errors; // => []
```

<hr className="api-item-divider" />

#### assertValidSchema()

Utility function which asserts a schema is valid by throwing an error if
it is invalid.

**Signature:**

<ApiSignature parts={[["name", "assertValidSchema"], "(", ["parameter", "schema"], ": ", ["link", "GraphQLSchema", "/api-v16/type#graphqlschema"], "): ", ["keyword", "void"], ";"]} />

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Arguments</div>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>schema</td>
      <td><ApiType parts={[["link", "GraphQLSchema", "/api-v16/type#graphqlschema"]]} /></td>
      <td>GraphQL schema to use.</td>
    </tr>
  </tbody>
</table>

<hr className="api-subsection-divider" />

<div className="api-subsection-title">Example</div>

```ts
import { assertValidSchema } from 'graphql/type';
import { buildSchema } from 'graphql/utilities';

const schema = buildSchema(`
  type Query {
    name: String
  }
`);

assertValidSchema(schema); // does not throw
```