Last active
November 28, 2022 11:07
-
-
Save rubenmarcus/c781422542c19cfaca4bbc3a74ffad81 to your computer and use it in GitHub Desktop.
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
query GetRoyaltiesInfo($metadataId: String!) | |
{ mb_views_nft_tokens(where:{ metadata_id: { _eq: $metadataId } burned_timestamp: { _is_null: true } } | |
distinct_on: royalties_percent ) { | |
royaltyPercent: royalties_percent | |
royalties | |
} | |
} |
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
query GetStoreDataById($id: String!) @cached { | |
store: nft_contracts(where: { id: { _eq: $id } }) | |
{ id | |
owner: owner_id | |
} | |
} |
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
query GetStoreNfts( | |
$offset: Int = 0 $condition: mb_views_nft_metadata_unburned_bool_exp ) | |
@cached | |
{ mb_views_nft_metadata_unburned( where: $condition | |
offset: $offset order_by: { minted_timestamp: desc } ) | |
{ createdAt: minted_timestamp | |
listed: price | |
media | |
storeId: nft_contract_id | |
metadataId: metadata_id | |
title base_uri | |
} | |
mb_views_nft_metadata_unburned_aggregate(where: $condition) | |
{ | |
aggregate { | |
count | |
} | |
} | |
} | |
variables: { condition: { nft_contract_id: { _in: formatedStores } } } |
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
query GetTokenById( | |
$tokenId: String! | |
$contractAddress: String! | |
) { | |
mb_views_nft_tokens( | |
where: { | |
nft_contract_id: { _eq: $contractAddress } | |
token_id: { _eq: $tokenId } | |
} | |
limit: 1 | |
) { | |
baseUri: base_uri | |
burned_receipt_id | |
burned_timestamp | |
copies | |
description | |
expires_at | |
issued_at | |
last_transfer_receipt_id | |
last_transfer_timestamp | |
media | |
minter | |
media_hash | |
mint_memo | |
nft_contract_is_mintbase | |
minted_receipt_id | |
minted_timestamp | |
metadata_id | |
document: reference_blob(path: "$.document") | |
animationUrl: reference_blob(path: "$.animation_url") | |
extra: reference_blob(path: "$.extra") | |
reference | |
reference_hash | |
starts_at | |
title | |
updated_at | |
owner | |
royalties | |
royalties_percent | |
token_id | |
} | |
mb_views_active_listings_aggregate( | |
where: { | |
token_id: { _eq: $tokenId } | |
kind: { _eq: "auction" } | |
nft_contract_id: { _eq: $contractAddress } | |
} | |
) { | |
aggregate { | |
count | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment