Chess Game API Example

mutation createGame
Game
Deprecated: Use newGame instead.

Create a game with the given players.
Returns the new game.

Arguments
whitePlayer 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.

blackPlayer 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.

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