-
Discord user IDNo response Describe your question in detail.This query was working, then it stopped working one day. I didn't change anything. why, what could be the issue? https://cloud.hasura.io/public/graphiql?endpoint=https://api.testnet.aptoslabs.com/v1/graphql query GetCollectionNfts($collection_name: String) {
current_token_datas_v2(
where: {
current_collection: {
collection_name: { _eq: $collection_name }
}
}
order_by: { last_transaction_timestamp: desc }
) {
token_name
description
token_uri
collection_id
last_transaction_timestamp
token_data_id
token_properties
current_token_ownerships {
owner_address
amount
}
}
} {
"collection_name": "Open Forge - 8c68bc"
} What error, if any, are you getting?{ What have you tried or looked at? Or how can we reproduce the error?No response Which operating system are you using?macOS Which SDK or tool are you using? (if any)Indexer API Describe your environment or tooling in detailNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi @aeither This is an expensive query, As for why it is suddenly errors out, it could be related to that we lowered the query time out in testnet: https://github.com/aptos-labs/internal-ops/pull/4400 - This is a change we deployed last week |
Beta Was this translation helpful? Give feedback.
-
There is a python code snippet to show you how to get collection id
…On Thu, Oct 31, 2024 at 9:56 PM aeither ***@***.***> wrote:
if you want to know more about collection id, you can check an example
here: https://aptos.dev/en/build/indexer/token-metadata
How can I get the collection ID?
—
Reply to this email directly, view it on GitHub
<#514 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A2YC4BAWAZITOFMOU4KIQY3Z6MCZDAVCNFSM6AAAAABQ4XWWBSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCMJRHA2DCNY>
.
You are receiving this because you commented.Message ID:
<aptos-labs/aptos-developer-discussions/repo-discussions/514/comments/11118417
@github.com>
|
Beta Was this translation helpful? Give feedback.
Hi @aeither
This is an expensive query,
last_transaction_timestamp
is not indexed and this will be very expensive for large collections. It's also expensive because you are filtering oncollection_name
which doesn't have an index. You should filter oncollection_id
As for why it is suddenly errors out, it could be related to that we lowered the query time out in testnet: aptos-labs/internal-ops#4400 - This is a change we deployed last week