Chess Game API Example

query game
Game

Get a game by ID.

Arguments
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

Returns
Game

Game [object]

A chess game.

Attributes
id ID

The ID of the game.

startedAt Date

The date and time when the game started.

endedAt Date

The date and time when the game ended.

white String

The name of the white player.

Deprecated: Use whitePlayer instead.
whitePlayer Player

The white player.

black String

The name of the black player.

Deprecated: Use blackPlayer instead.
blackPlayer Player

The black player.

board ChessBoard

The current state of the chess board.

movesCount Int

The number of moves in the game.

moves String []

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

The winner of the game.

prize Float

The prize of the game.

API:
Chess Game GraphQL API
API:
Chess Game GraphQL API