collectionBySlug

The query "collectionBySlug" fetchs All the marketPlace collection items.

Sample query

query CollectionBySlug($slug: String!, $marketplaceID: UUID1!,$offset: Int,$limit: Int) {
  collectionBySlug(slug: $slug, marketplaceID: $marketplaceID) {
    id
    itemsCount
    items (
      offset: $offset
      limit: $limit
    )  {
      ...CollectionItemData
      __typename
    }
    __typename
  }
}

fragment CollectionItemData on MarketplaceCollectionItem {
  id
  slug
  collectionSlug
  name
  saleType
  collectionId
  artist {
    id
    artistName
    slug
    __typename
  }
  asset {
    currentVersion {
      id
      cdnUrl
      name
      __typename
    }
    __typename
  }
  isReserved
  NFTDetails {
    contractAddress
    tokenId
    tokenType
    network {
      id
      name
      chainID
      __typename
    }
    metadata {
      name
      image
      video
      description
      animationURL
      openSeaImageType
      media {
        uri
        dimensions
        mimeType
        size
        __typename
      }
      __typename
    }
    __typename
  }
  details {
    ... on MarketplaceBuyNowOutput {
      id
      unitPrice
      totalUnits
      totalAvailableUnits
      startDate
      endDate
      sortNumber
      __typename
    }
    ... on MarketplaceAuctionLot {
      feeStructure {
        buyersPremiumRate {
          from
          to
          rate
          __typename
        }
        overheadPremiumRate {
          from
          to
          rate
          __typename
        }
        __typename
      }
      marketplaceCollectionItemId
      startDate
      endDate
      status
      currentBid {
        id
        marketplaceAuctionLotId
        marketplaceUser {
          id
          username
          avatar
          __typename
        }
        amount
        isCurrent
        nextBidIncrement
        createdAt
        currentBid
        __typename
      }
      myBid {
        id
        createdAt
        marketplaceAuctionLotId
        amount
        __typename
      }
      startingBid
      marketplaceAuctionOnChainSettings {
        id
        networkID
        __typename
      }
      __typename
    }
    ... on MarketplaceClaimableOutput {
      id
      totalUnits
      totalAvailableUnits
      startDate
      endDate
      perWalletLimit
      claimingType
      marketplaceCollectionItem {
        id
        __typename
      }
      __typename
    }
    __typename
  }
  deliveryMethod
  mintOnDemandData {
    tokenContractAddress
    description
    onChainID
    network {
      id
      name
      chainID
      __typename
    }
    tokenType
    metaDataURI
    carousel {
      carouselMedia
      carouselCaption
      __typename
    }
    __typename
  }
  __typename
}

Sample variable

{
  "slug": "buynow-test-hari-drop",
  "marketplaceID": "4195d61f-bcb9-4c4a-abf5-0d3ddb0b73a9",
  "offset":0,
  "limit" :10
}

Sample response

{
  "data": {
    "collectionBySlug": {
      "id": "e6aadb5a-bbf0-45d8-8bdb-234e852de42a",
      "itemsCount": 1,
      "items": [
        {
          "id": "3db1a4af-e70e-4ad1-9d34-7fb008302911",
          "slug": "test-listing",
          "collectionSlug": "",
          "name": "test listing",
          "saleType": "BuyNow",
          "collectionId": "e6aadb5a-bbf0-45d8-8bdb-234e852de42a",
          "artist": null,
          "asset": {
            "currentVersion": {
              "id": "9fb9a5b5-4c5c-43f8-bf41-713d3c1c5d42",
              "cdnUrl": "https://storage.googleapis.com/mojito-sandbox-public/organizations/5eb26a32-2a2f-4f4a-88fa-e92fad02b67d/images/cd03d3d5-eff6-4d73-b7d4-383dc570f014.jpg?z=1",
              "name": "27.jpg",
              "__typename": "AssetVersion"
            },
            "__typename": "Asset"
          },
          "isReserved": false,
          "NFTDetails": [
            {
              "contractAddress": "0x117df7059dcea8b6398ae9e32cfe8ab7d383cfb5",
              "tokenId": "1",
              "tokenType": "ERC721",
              "network": {
                "id": "b260424b-bb37-4a3e-86d0-0866175e5e68",
                "name": "Sepolia Ethereum Testnet",
                "chainID": 11155111,
                "__typename": "Network"
              },
              "metadata": {
                "name": "test 1",
                "image": "https://gateway.arweave.net/cOlcsOI7d_lJF3I9vmMvNDQJ24QRb-Haay25PW6y4q4",
                "video": "",
                "description": "test 1",
                "animationURL": null,
                "openSeaImageType": null,
                "media": null,
                "__typename": "ERC721Metadata"
              },
              "__typename": "CollectionNFTDetails"
            },
            {
              "contractAddress": "0x117df7059dcea8b6398ae9e32cfe8ab7d383cfb5",
              "tokenId": "2",
              "tokenType": "ERC721",
              "network": {
                "id": "b260424b-bb37-4a3e-86d0-0866175e5e68",
                "name": "Sepolia Ethereum Testnet",
                "chainID": 11155111,
                "__typename": "Network"
              },
              "metadata": {
                "name": "test 2",
                "image": "https://gateway.arweave.net/n3_FkMvVp7dEJ_M0BRuBPjW1K-tG88Jj_mYV1aGFh8s",
                "video": "",
                "description": "test 2",
                "animationURL": null,
                "openSeaImageType": null,
                "media": null,
                "__typename": "ERC721Metadata"
              },
              "__typename": "CollectionNFTDetails"
            }
          ],
          "details": {
            "id": "cb60e22c-6e09-453e-b668-1d6d21a3ce12",
            "unitPrice": 1,
            "totalUnits": 2,
            "totalAvailableUnits": 2,
            "startDate": "2024-01-10T09:33:31.003Z",
            "endDate": "2024-01-31T09:33:31Z",
            "sortNumber": 0,
            "__typename": "MarketplaceBuyNowOutput"
          },
          "deliveryMethod": "",
          "mintOnDemandData": null,
          "__typename": "MarketplaceCollectionItem"
        }
      ],
      "__typename": "MarketplaceCollection"
    }
  }
}

Arguments

NameTypeDescriptionRequired
marketplaceIDUUIDmarketplace id.Yes
slugStringslugYes
limitIntlimit of itemsNo
offsetIntOffsetNo

Fields

NameTypeDescription
collectionBySlugObjectContains all information from collectionBySlug