Queries for Collections

collection

Returns a single collection by id or game slug and collection slug.

collection(id, game_slug, collection_slug) { /* Collection fields */ }

Arguments

collection_slug String

The slug of the Collection to return. This must be used in conjunction with game_slug.

game_slug String

The slug of the game to which the Collection belongs. This must be used in conjunction with collection_slug.

id Int

The ID of the Collection to return.

Response

Collection.* Collection

Any requested field from the Collection object.

Example

Request

query { collection(id: 7) { id name slug num_assets active logo_media { media_type_id url } } }
query { collection(game_slug: "otherside", collection_slug: "otherdeed") { id name slug num_assets active logo_media { media_type_id url } } }

Response

{ "data": { "collection": { "id": 7, "name": "Otherdeed", "slug": "otherdeed", "num_assets": 9708, "active": true, "logo_media": { "media_type_id": 1, "url": "https://parcel-static-host.s3.amazonaws.com/media/worlds/7/logo.jpeg" } } } }

collections

Returns all available collections.

collections( active, indexable, genre_id, asset_type_id, limit, offset ) { /* Collection fields */ }

Arguments

active Boolean

Returns only active or only inactive collections if set to true or false, respectively. Cannot be used with asset_type_id or genre_id.

asset_type_id Int

Filters collections by asset type. Returns only active collections. See Asset Types - Queries to retrieve a list of available asset types.

genre_id Int

Filters collections by genre. Returns only active collections. See Genres - Queries to retrieve a list of available genres.

indexable Boolean

Returns only indexable or non-indexable collections if set to true or false, respectively.

limit Int DEPRECATED

An optional limit to the number of collections returned. (To be replaced by cursor pagination in a forthcoming release).

offset Int DEPRECATED

An optional offset to the set of collections returned. (To be replaced by cursor pagination in a forthcoming release).

Response

Collection.* [Collection!]

A list of Collection objects returning any requested fields from the Collection object.

Example

Request

query { collections { id name slug contract_addresses { address game { name } } } }
# Returns all collections of the genre "2D" query { collections(genre_id: 3) { id name slug contract_addresses { address game { name } } } }
# Returns all collections that contain assets of type "Mount/Vehicle" query { collections(asset_type_id: 6) { id name slug contract_addresses { address game { name } } } }

Response

{ "data": { "collections": [ { "id": 1, "name": "Land", "slug": "land", "contract_addresses": [ { "address": "0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d", "game": { "name": "Decentraland" } } ] }, { "id": 2, "name": "Land", "slug": "land", "contract_addresses": [ { "address": "0x50f5474724e0ee42d9a4e711ccfb275809fd6d4a", "game": { "name": "The Sandbox" } }, { "address": "0x5CC5B05a8A13E3fBDB0BB9FcCd98D38e50F90c38", "game": { "name": "The Sandbox" } } ] }, ... { "id": 54, "name": "Zed Run", "slug": "zed-run", "contract_addresses": [ { "address": "0x67f4732266c7300cca593c814d46bee72e40659f", "game": { "name": "ZED RUN" } } ] } ] } }
{ "data": { "collections": [ { "id": 9, "name": "Land", "slug": "land", "contract_addresses": [ { "address": "0x4a8c9d751eeabc5521a68fb080dd7e72e46462af", "game": { "name": "Arcade" } } ] }, { "id": 11, "name": "Land", "slug": "land", "contract_addresses": [ { "address": "0x8bf3a40ea2337e6e4f6e540680ea6390cb3b4e11", "game": { "name": "Highrise" } } ] }, { "id": 16, "name": "Land", "slug": "genesis-land", "contract_addresses": [ { "address": "0x2c88aa0956bc9813505d73575f653f69ada60923", "game": { "name": "Wolf Game" } } ] }, { "id": 25, "name": "Sheep and Wolves", "slug": "sheep-and-wolves", "contract_addresses": [ { "address": "0x7f36182dee28c45de6072a34d29855bae76dbe2f", "game": { "name": "Wolf Game" } } ] }, { "id": 26, "name": "Wool Pouch", "slug": "wool-pouch", "contract_addresses": [ { "address": "0xb76fbbb30e31f2c3bdaa2466cfb1cfe39b220d06", "game": { "name": "Wolf Game" } } ] }, { "id": 27, "name": "Farmer", "slug": "farmer", "contract_addresses": [ { "address": "0xbda2481db91fc0f942ed3f53de378ba45ba9d17e", "game": { "name": "Wolf Game" } } ] } ] } }
{ "data": { "collections": [ { "id": 41, "name": "Wilder Moto Genesis", "slug": "wilder-moto", "contract_addresses": [ { "address": "0x51bd5948cf84a1041d2720f56ded5e173396fc95", "game": { "name": "Wilder World" } } ] }, { "id": 54, "name": "Zed Run", "slug": "zed-run", "contract_addresses": [ { "address": "0x67f4732266c7300cca593c814d46bee72e40659f", "game": { "name": "ZED RUN" } } ] } ] } }