Chess Game API Example

Game [object]

A chess game.

Attributes
id ID

ID [scalar]

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.

API:
Chess Game GraphQL API

The ID of the game.

startedAt Date

Date [scalar]

A date represented as a string. For example: "2019-01-01T12:00:00Z".

API:
Chess Game GraphQL API

The date and time when the game started.

endedAt Date

Date [scalar]

A date represented as a string. For example: "2019-01-01T12:00:00Z".

API:
Chess Game GraphQL API

The date and time when the game ended.

white String

String [scalar]

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

API:
Chess Game GraphQL API

The name of the white player.

Deprecated: Use whitePlayer instead.
whitePlayer Player

Player [union]

A player.

Union
HumanComputer
API:
Chess Game GraphQL API

The white player.

black String

String [scalar]

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

API:
Chess Game GraphQL API

The name of the black player.

Deprecated: Use blackPlayer instead.
blackPlayer Player

Player [union]

A player.

Union
HumanComputer
API:
Chess Game GraphQL API

The black player.

board ChessBoard

ChessBoard [object]

A chess board.

Attributes
squares ChessPiece [] []

The squares of the chess board. The first square is the top-left corner.

API:
Chess Game GraphQL API

The current state of the chess board.

movesCount Int

Int [scalar]

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

API:
Chess Game GraphQL API

The number of moves in the game.

moves String []

String [scalar]

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

API:
Chess Game GraphQL API

Get the last N moves of the game. Returns all moves if no argument is provided.

winner ChessPieceColor

ChessPieceColor [enum]

A color used for chess pieces.

Possible values
WHITE

A white chess piece.

OLD_WHITE

Invalid color to test enum deprecation

Deprecated: Use WHITE instead.
BLACK

A black chess piece.

OLD_BLACK

Invalid color to test enum deprecation

Deprecated: Use BLACK instead.
API:
Chess Game GraphQL API

The winner of the game.

prize Float

Float [scalar]

The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.

API:
Chess Game GraphQL API

The prize of the game.

API:
Chess Game GraphQL API