Skip to main content

GraphQL API Reference

About GraphQL

The GraphQL data query language is:

  • A specification. The spec determines the validity of the schema on the API server. The schema determines the validity of client calls.

  • Strongly typed. The schema defines an API's type system and all object relationships.

  • Introspective. A client can query the schema for details about the schema.

  • Hierarchical. The shape of a GraphQL call mirrors the shape of the JSON data it returns. Nested fields let you query for and receive only the data you specify in a single round trip.

  • An application layer. GraphQL is not a storage model or a database query language. The graph refers to graph structures defined in the schema, where nodes define objects and edges define relationships between objects. The API traverses and returns application data based on the schema definitions, independent of how the data is stored.

The query type defines GraphQL operations that retrieve data from the server.

The mutation type defines GraphQL operations that change data on the server.

Objects are the building blocks of GraphQL APIs. They represent the resources that can be accessed via the API.

Interfaces are abstract types that can be implemented by other objects.

Enums represent possible sets of values for a field.

Unions are abstract types that can be used to return one of a number of different objects.

An Input Object defines a set of input fields; the input fields are either scalars, enums, or other input objects.

Scalars represent primitive data types that can be returned from a GraphQL API.

Graphql Queries and Mutations can raise different kinds of errors; Kraken specifies many of our own, which you can find here.