Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GraphQL] - Testnet graphql is providing old responses #17780

Closed
chfarmdev opened this issue May 16, 2024 · 5 comments
Closed

[GraphQL] - Testnet graphql is providing old responses #17780

chfarmdev opened this issue May 16, 2024 · 5 comments
Assignees
Labels

Comments

@chfarmdev
Copy link

chfarmdev commented May 16, 2024

Steps to Reproduce Issue

All of my gql queries have been posting old data. I've tested both within my game UI and https://sui-testnet.mystenlabs.com/graphql
Balances, coin objects, and some specific NFT data are all stale.
It's been broken for at least a day. I dropped a message in dev-discussion discord about a day ago when initially noted. One example below.

{
address(address: "0x2a5406dff77a774786b733d62f994b8ce0df27a603a6087681458f3f977c70ed") {
balance {
coinObjectCount
totalBalance
}
}
}

Expected Result

Current SUI balance on that wallet is 47.56, confirmed in wallet and on SuiScan

https://suiscan.xyz/testnet/account/0x2a5406dff77a774786b733d62f994b8ce0df27a603a6087681458f3f977c70ed

Actual Result

{
"data": {
"address": {
"balance": {
"coinObjectCount": 1,
"totalBalance": "51585599344"
}
}
}
}

System Information

Thanks!

@stefan-mysten
Copy link
Contributor

stefan-mysten commented May 16, 2024

Thanks for your report @chfarmdev. We are aware of the issue and we've already taken actions to remediate it. Everything should be back to normal shortly.

@chfarmdev
Copy link
Author

@stefan-mysten Any updates? GraphQL appears to still not be functioning properly returning the same stale data. Is the fix waiting on next version in testnet or did the prior fix not work?

Thanks!

@stefan-mysten
Copy link
Contributor

@chfarmdev this was an issue related to the indexer DB, which we fixed and should have been fine by now. I pinged one of my colleagues and will post here when I have an update. Apologies for the inconvenience.

@stefan-mysten
Copy link
Contributor

This should now be fixed.

{
  "data": {
    "checkpoint": {
      "sequenceNumber": 38189304,
      "timestamp": "2024-05-20T22:51:19.026Z"
    }
  }
}

@chfarmdev
Copy link
Author

@stefan-mysten Thanks, the SUI balance does look correct however my other types are definitely not accurate still. Is there still further catchup to be completed for the indexer?

Shows 12 Warlord NFTs on SuiScan
https://suiscan.xyz/testnet/account/0x2a5406dff77a774786b733d62f994b8ce0df27a603a6087681458f3f977c70ed
0xaccb4a10ab5b5761393fcb9901d21eb1e4978864f7a53526600ff1f39faee5ea::warlord::SuiWarlordNFT

GraphQL returns 29 entities for my account and the SuiWarlordNFT type. Using below query.
address - 0x2a5406dff77a774786b733d62f994b8ce0df27a603a6087681458f3f977c70ed
type - 0xaccb4a10ab5b5761393fcb9901d21eb1e4978864f7a53526600ff1f39faee5ea::warlord::SuiWarlordNFT

export const getWarlords = gql

query getWarlords(
$address: String!,
$type: String!
$cursor: String,
) {
address(address: $address) {
objects(after: $cursor, first:10, filter: {
type: $type
} )
{
pageInfo{
hasNextPage
endCursor
}
nodes {
contents{
data
}
}
}
}
}
;

Probably also worth noting that GraphQL is not returning newly minted Warlords. This looks like state from several weeks ago before I wrote my burn module and converted many of these NFT's into Soul Gems.

Also data is wrong on my "Time COIN"

0xaccb4a10ab5b5761393fcb9901d21eb1e4978864f7a53526600ff1f39faee5ea::time::TIME

Should be returning 2 objects for 959 TIME but gql is responding with 7 objects for 1378 total.

export const allBalances = gql
query allBalances($address: String!, $type: String!) {
address(address: $address) {
balance(type: $type) {
coinObjectCount
totalBalance
}
}
}
;

Is that expected behavior? Should I just redeploy my package/app and start with fresh data?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants