Skip to main content
๐ŸŽ‰ GP CONF 2026: WEB Games Market Conference ๐Ÿ‘พ September 23 | Details

Pages

Pages define routes and ordered content blocks. The platform configuration supplies mainPageId and legal page IDs; menus can also reference page entities.

Execution context: browser or platform server. A browser sends Content-Type, X-Game-Platform-ID, matching Origin, and credentials: 'include'. A server also sends X-Game-Platform-Api-Key. Do not expose that key to the browser.

Resolve a platform site URLโ€‹

Resolve the requested URL before loading its content. The result tells the router which entity query to run and supplies redirects, localized alternatives, and route-level SEO.

query ResolvePlatformSiteRoute(
$input: GetGamePlatformEntityByUrlInput!
$lang: Lang
) {
result: GetGamePlatformEntityByUrl(input: $input) {
__typename
... on Problem {
message
}
... on GamePlatformEntity {
type
entityId
platformId
lang
redirectUrl
disablePageBanners
alternateUrls {
en
ru
}
seoSettings {
ogTitle(lang: $lang)
ogDescription(lang: $lang)
ogImage(lang: $lang)
}
}
}
}

Variables:

{
"lang": "EN",
"input": {
"url": "https://games.example.com/en/popular/"
}
}

Use the complete public URL, without its query string. Add the language fields supported by your platform to alternateUrls; use them for language-switching and hreflang links.

  • If redirectUrl is not empty, redirect to it permanently.
  • Route PAGE and MAIN_PAGE to FetchGamePlatformPage.
  • Route GAME to the public game page and GAME_FRAME to its iframe mode using the Games API.
  • Route COLLECTION to the Collections API. Route CATEGORY, CATEGORIES, TAG, and TAGS with the keys and URLs returned by the Platform query.
  • Route SEARCH to a catalogue search with withMetrics: false and filter.searchFilter from the Games API.
  • Treat Problem with page_not_found as a 404 response.

List pagesโ€‹

query PlatformPages($input: FetchGamePlatformPagesInput!, $lang: Lang) {
result: FetchGamePlatformPages(input: $input) {
__typename
... on Problem {
message
}
... on GamePlatformPagesList {
count
items {
id
platformId
isActive
slug(lang: $lang)
name(lang: $lang)
disablePageBanners
useCustomTitleInMetaTags
}
}
}
}

Variables:

{
"lang": "EN",
"input": {
"platformId": 42
}
}

Successful response:

{
"data": {
"result": {
"__typename": "GamePlatformPagesList",
"count": 2,
"items": [
{
"id": "home",
"platformId": 42,
"isActive": true,
"slug": "home",
"name": "Home",
"disablePageBanners": false,
"useCustomTitleInMetaTags": false
}
]
}
}
}

Use the optional search input to filter the list by page name. Do not create routes for inactive pages.

Load a page and its blocksโ€‹

query PlatformPage(
$input: FetchGamePlatformPageInput!
$lang: Lang
) {
result: FetchGamePlatformPage(input: $input) {
__typename
... on Problem {
message
}
... on GamePlatformPage {
id
isActive
slug(lang: $lang)
name(lang: $lang)
description(lang: $lang)
disablePageBanners
useCustomTitleInMetaTags
seoSettings {
ogTitle(lang: $lang)
ogDescription(lang: $lang)
ogImage(lang: $lang)
}
blocks {
type
entityId
collectionDisplayType
collectionHideTitle
collectionWrapper {
wrapIcon
hideIcon
iconColor
hideTitle
showAllCards
sort
}
content(lang: $lang) {
__typename
... on ContentTypeBlock {
content
}
... on GamePlatformCollection {
id
name(lang: $lang)
slug(lang: $lang)
icon(lang: $lang)
games(length: 0) {
count
items {
id
name(lang: $lang)
icon(lang: $lang)
platformUrl(lang: $lang)
}
}
}
... on GamePlatformCategory {
key
name
url
games(length: 0) {
count
items {
id
name(lang: $lang)
icon(lang: $lang)
platformUrl(lang: $lang)
}
}
}
... on GamePlatformTag {
key
name
url
games(length: 0) {
count
items {
id
name(lang: $lang)
icon(lang: $lang)
platformUrl(lang: $lang)
}
}
}
}
}
}
}
}

For content resolved inside a page block, the API chooses the embedded game-preview size from collectionDisplayType. The required games(length: ...) argument does not override that preloaded preview, so this example passes 0 as a placeholder. Use the Collections API when you need an explicit page size and pagination.

Variables:

{
"lang": "EN",
"input": {
"id": "home",
"targetOS": "Desktop"
}
}

Successful response shape:

{
"data": {
"result": {
"__typename": "GamePlatformPage",
"id": "home",
"isActive": true,
"slug": "home",
"name": "Home",
"blocks": [
{
"type": "COLLECTION",
"entityId": "7",
"collectionDisplayType": "LARGE_HORIZONTAL_TILES",
"content": {
"__typename": "GamePlatformCollection",
"id": 7,
"name": "Popular",
"slug": "popular"
}
}
]
}
}
}

Render blocks in the returned order. Use collectionDisplayType and collectionWrapper for layout. For MY_GAMES, load the authenticated player's playedGames as described in Player. If showAllCards requires pagination, continue through the Collections API instead of relying only on the embedded preview.

Block typeSite behavior
CONTENTRender the returned ContentTypeBlock.content. Sanitize HTML before injecting it into the page.
CUSTOMSelect a site-specific component by entityId. If the frontend does not support that identifier, skip the block or render a safe fallback; content is not the custom component payload.
COLLECTIONRender the returned collection and its embedded game preview.
CATEGORY or TAGRender the returned category or tag and its game preview.
MY_GAMESLoad the signed-in player's played games; show an empty or sign-in state for other visitors.