About this endpoint
What it does
Executes a GraphQL query against the PlaySocket GraphQL Gateway and returns the corresponding GraphQL response payload.
The API supports PlaySocket's Classical Games and Brain Games, including Sudoku, Schulte Table, and Stroop Test.
The request body must include a GraphQL query and can optionally include variables and operationName.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
query | String | Yes | The GraphQL query document to execute. |
variables | Object | No | Optional map of GraphQL variables referenced in the query. Nullable. |
operationName | String | No | Optional name of the operation to execute when the query contains multiple named operations. Nullable. |
Response
Returns a JSON object containing nullable data and errors fields.
When the query succeeds, data can contain newSudokuBoard, newSchulteTable, and/or newStroopTable, depending on the fields selected in the GraphQL query.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
data | Object | No | Nullable response container containing the requested GraphQL payload, such as newSudokuBoard, newSchulteTable, or newStroopTable. |
errors | Object Array | No | Nullable array of GraphQL error objects, present when query execution fails. |
Supported Games
- Sudoku — Generates a new Sudoku board.
- Schulte Table — Generates a new Schulte Table for visual attention and speed training.
- Stroop Table — Generates a Stroop Table for testing cognitive flexibility and response inhibition.