-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove FetchFeaturedAssets query by multiple FetchFeaturedToken query
- Loading branch information
1 parent
be9538b
commit 56e7b6c
Showing
7 changed files
with
305 additions
and
322 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
query FetchFeaturedToken( | ||
$chainId: Int! | ||
$collectionAddress: Address! | ||
$tokenId: String! | ||
$now: Datetime! | ||
$address: Address | ||
) { | ||
asset( | ||
chainId: $chainId | ||
collectionAddress: $collectionAddress | ||
tokenId: $tokenId | ||
) { | ||
id | ||
chainId | ||
collectionAddress | ||
tokenId | ||
name | ||
collection { | ||
chainId | ||
address | ||
name | ||
standard | ||
mintType | ||
} | ||
image | ||
imageMimetype | ||
animationUrl | ||
animationMimetype | ||
quantity | ||
creator { | ||
address | ||
name | ||
image | ||
verification { | ||
status | ||
} | ||
} | ||
owned: ownership(ownerAddress: $address) { | ||
quantity | ||
} | ||
bestBid { | ||
unitPrice | ||
amount | ||
currency { | ||
image | ||
name | ||
id | ||
decimals | ||
symbol | ||
} | ||
} | ||
} | ||
ownerships( | ||
filter: { | ||
chainId: { equalTo: $chainId } | ||
collectionAddress: { equalTo: $collectionAddress } | ||
tokenId: { equalTo: $tokenId } | ||
} | ||
orderBy: [ | ||
QUANTITY_DESC | ||
ACCOUNT_BY_OWNER_ADDRESS__NAME_ASC | ||
OWNER_ADDRESS_ASC | ||
] | ||
first: 5 | ||
) { | ||
totalCount | ||
nodes { | ||
ownerAddress | ||
quantity | ||
owner { | ||
address | ||
name | ||
image | ||
verification { | ||
status | ||
} | ||
} | ||
} | ||
} | ||
sales: offerOpenSales( | ||
orderBy: [UNIT_PRICE_IN_REF_ASC, CREATED_AT_ASC] | ||
filter: { | ||
chainId: { equalTo: $chainId } | ||
collectionAddress: { equalTo: $collectionAddress } | ||
tokenId: { equalTo: $tokenId } | ||
expiredAt: { greaterThan: $now } | ||
} # TODO: implement pagination. when implementing pagination, find a way to get availableQuantity of all sales | ||
) { | ||
nodes { | ||
id | ||
chainId | ||
collectionAddress | ||
tokenId | ||
unitPrice | ||
availableQuantity | ||
expiredAt | ||
currency { | ||
image | ||
name | ||
id | ||
decimals | ||
symbol | ||
} | ||
maker { | ||
image | ||
address | ||
name | ||
verification { | ||
status | ||
} | ||
} | ||
} | ||
} | ||
currencies( | ||
orderBy: CREATED_AT_ASC | ||
filter: { | ||
chainId: { equalTo: $chainId } | ||
address: { isNull: false } # keep only non-native currency. Cannot create bid with native currency. | ||
} | ||
) { | ||
nodes { | ||
chainId | ||
image | ||
} | ||
} | ||
} |
Oops, something went wrong.