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": "cliam-drop-hari-test",
  "marketplaceID": "4195d61f-bcb9-4c4a-abf5-0d3ddb0b73a9",
  "offset":0,
  "limit" :10
}

Sample response

{
  "data": {
    "collectionBySlug": {
      "id": "b8e74a41-0df7-4ac9-9ed3-fc14fe855eca",
      "itemsCount": 1,
      "items": [
        {
          "id": "af9ac2aa-cc2d-4d54-88ae-edfc210d21b5",
          "slug": "test-claim-listing",
          "collectionSlug": "",
          "name": "test claim listing",
          "saleType": "Claimable",
          "collectionId": "b8e74a41-0df7-4ac9-9ed3-fc14fe855eca",
          "artist": null,
          "asset": {
            "currentVersion": {
              "id": "9d1fb8a7-6bda-42fa-b96a-93f55baeec88",
              "cdnUrl": "https://storage.googleapis.com/mojito-sandbox-public/organizations/5eb26a32-2a2f-4f4a-88fa-e92fad02b67d/images/b0888ed8-9dcf-4a03-b69e-4c56c658c61e.jpg?z=1",
              "name": "19.jpg",
              "__typename": "AssetVersion"
            },
            "__typename": "Asset"
          },
          "isReserved": false,
          "NFTDetails": null,
          "details": {
            "id": "d4438291-eb7d-46c5-b274-fa1dae7ab05d",
            "totalUnits": 10,
            "totalAvailableUnits": 9,
            "startDate": "2024-01-10T10:34:17.285Z",
            "endDate": "2024-01-31T10:34:17Z",
            "perWalletLimit": 0,
            "claimingType": "Any",
            "marketplaceCollectionItem": {
              "id": "00000000-0000-0000-0000-000000000000",
              "__typename": "MarketplaceCollectionItem"
            },
            "__typename": "MarketplaceClaimableOutput"
          },
          "deliveryMethod": "",
          "mintOnDemandData": null,
          "__typename": "MarketplaceCollectionItem"
        }
      ],
      "__typename": "MarketplaceCollection"
    }
  }
}

Arguments

NameTypeDescriptionRequired
marketplaceIDUUIDmarketplace id.Yes
slugStringslugYes
limitIntlimit of itemsNo
offsetIntOffsetNo

Fields

NameTypeDescription
collectionBySlugObjectContains all information from collectionBySlug