GraphQL API Overview
MMO-DEV WEB provides a single GraphQL API for websites, the launcher, and player account flows.
Client requests are sent to the project endpoint: /graphql. Clients send documentId and variables; allowed documents are listed in the API reference.
Request Format
POST /graphql HTTP/1.1
Accept-Language: en
Content-Type: application/json
Authorization: Bearer optional-session-id
X-Project-Context: <project-context-token>
X-Request-Id: optional-request-id
{
"documentId": "me",
"variables": {}
}
In API requests, use a documented ID such as me, login, servers, shopOffers, or preparePlayerWalletTopUp.
GraphQL examples in the reference show the operation shape and available fields. Public HTTP requests still send only documentId and variables.
X-Project-Context comes from identity.contextToken in the current project configuration. Use changeServer to switch the selected server. Public catalogs and operations targeting a specific server accept gameServerId in variables.
Response Format
Successful response:
{
"data": {
"me": {
"id": "1",
"balance": 100.0
}
}
}
Error response:
{
"errors": [
{
"message": "Error description",
"extensions": {
"category": "authentication"
}
}
],
"data": null
}
Scalar Types
| Type | Description | Example |
|---|---|---|
DateTime | Date and time in Y-m-d H:i:s format | 2024-01-15 13:43:32 |
JSON | Arbitrary data in JSON format | {"key": "value"} |
ID | Unique identifier (string) | "42" |
Float | Floating-point number | 99.5 |
Int | Integer | 10 |
Boolean | Boolean value | true |
String | String | "text" |
Operation Count
| Type | Count |
|---|---|
| Queries | 50+ |
| Mutations | 60+ |
| Types and Input types | 80+ |