Queries for Games
game
Returns a single game.
game(id, slug) {
/* Game fields */
}
Arguments
id
Int
id
IntThe ID of the Game to return.
slug
String
slug
StringThe slug of the Game to return.
Response
Game.*
Game
Game.*
GameAny requested field from the Game object.
Example
Request
query {
game(id: 21) {
id
name
slug
description
developer
status
logo_media {
media_type_id
url
}
}
}
query {
game(slug: "league-of-kingdoms") {
id
name
slug
description
developer
status
logo_media {
media_type_id
url
}
}
}
Response
{
"data": {
"game": {
"id": 21,
"name": "League of Kingdoms",
"slug": "league-of-kingdoms",
"description": "League of Kingdoms is an MMO Strategy game on the blockchain. On the genesis continent, all lands are NFTs and owned by users. You can own, play, and earn rewards by developing your own kingdoms. It will be a decentralized and self-sovereign economy shaped by users. Your strategy begins here!",
"developer": "NPlus Entertainment",
"status": "Live",
"logo_media": {
"media_type_id": 1,
"url": "https://parcel-static-host.s3.amazonaws.com/media/worlds/21/logo.png"
}
}
}
}
games
Returns all available games.
games(active, genre_id, limit, offset) {
/* Game fields */
}
Arguments
active
Boolean
active
BooleanBy default games
only returns active games. Set this to false to return only inactive games.
genre_id
Int
genre_id
IntWhen set, games
will only return games of the genre requested.
limit
Int DEPRECATED
limit
Int DEPRECATEDAn optional limit to the number of games returned. (To be replaced by cursor pagination in a forthcoming release).
offset
Int DEPRECATED
offset
Int DEPRECATEDAn optional offset to the set of games returned. (To be replaced by cursor pagination in a forthcoming release).
Response
Game.*
[Game!]
Game.*
[Game!]A list of Game objects returning any requested fields from the Game object.
Example
Request
query {
games {
id
name
}
}
# Returns all collections of the genre "2D"
query {
games(genre_id: 3) {
id
name
}
}
Response
{
"data": {
"games": [
{
"id": 7,
"name": "Otherside"
},
{
"id": 1,
"name": "Decentraland"
},
{
"id": 34,
"name": "Uldor"
},
...
{
"id": 35,
"name": "Fief"
}
]
}
}
{
"data": {
"games": [
{
"id": 9,
"name": "Arcade"
},
{
"id": 11,
"name": "Highrise"
},
{
"id": 16,
"name": "Wolf Game"
}
]
}
}