kodadot/nft-gallery

View on GitHub
queries/subsquid/general/unlockableCollectionById.graphql

Summary

Maintainability
Test Coverage
#import "../../fragments/collection.graphql"
#import "../../fragments/collectionDetails.graphql"
#import "../../fragments/subsquidNft.graphql"
#import "../../fragments/baseMeta.graphql"

query unlockableCollectionById(
  $id: String!
  $search: [NFTEntityWhereInput!]
  $orderBy: NFTEntityOrderByInput = blockNumber_DESC
  $first: Int
  $offset: Int
) {
  collectionEntity: collectionEntityById(id: $id) {
    ...collection
    ...collectionDetails
    createdAt
    max
    nftCount
    meta {
      ...baseMeta
    }
    nfts(
      orderBy: [$orderBy, blockNumber_DESC]
      limit: $first
      offset: $offset
      where: { burned_eq: false, AND: $search }
    ) {
      id
      sn
      metadata
      name
      price
      burned
      currentOwner
      ...subsquidNft
    }
  }
}