hack-a-chain-software / indexer-kadena

0 stars 2 forks source link

[Test] Query: nodes #117

Open davibauer opened 1 week ago

davibauer commented 1 week ago

Execution Times

Kadena:

Hack-a-chain:

Results

Reference Query https://graph.kadena.network/graphql

query Nodes {
    nodes(
        ids: ["QmxvY2s6Z19vQjdIT2JuYk14dWxGUXlSYWg0a0hVYnNXenhlUVlIMnRDbnJsUk83UQ=="]
    ) {
        id
        ... on FungibleAccount {
            id
            accountName
            fungibleName
            totalBalance
        }
        ... on NonFungibleChainAccount {
            id
            accountName
            chainId
        }
        ... on NonFungibleTokenBalance {
            accountName
            balance
            chainId
            id
            tokenId
            version
        }
        ... on Block {
            id
            hash
            creationTime
            difficulty
            epoch
            flags
            height
            nonce
            payloadHash
            weight
            target
            powHash
        }
        ... on Event {
            id
            name
            height
            moduleName
            orderIndex
            parameters
            qualifiedName
        }
        ... on FungibleChainAccount {
            id
            accountName
            chainId
            fungibleName
        }
        ... on Transaction {
            id
            hash
            result {
                ... on TransactionResult {
                    badResult
                    continuation
                    eventCount
                    gas
                    goodResult
                    height
                    logs
                    metadata
                    transactionId
                }
            }
        }
        ... on Signer {
            address
            id
            pubkey
            scheme
        }
        ... on Transfer {
            amount
            blockHash
            creationTime
            height
            id
            moduleHash
            moduleName
            orderIndex
            receiverAccount
            requestKey
            senderAccount
        }
    }
}
mschead commented 2 days ago

@davibauer can you check this query on the kadena endpoint again? I got this error.

{
  "errors": [
    {
      "message": "Unexpected response: \"{\\\"data\\\":{\\\"nodes\\\":[{\\\"hash\\\":\\\"g_oB7HObnbMxulFQyRah4kHUbsWzxeQYH2tCnrlRO7Q\\\",\\\"creationTime\\\":\\\"2024-09-13T21:01:48.368Z\\\",\\\"difficulty\\\":990836280121150345,\\\"epoch\\\":\\\"2024-09-13T20:36:32.314Z\\\",\\\"flags\\\":0,\\\"height\\\":5126571,\\\"nonce\\\":7905411167412359000,\\\"payloadHash\\\":\\\"cDTcnktV4YNxzwfXd9HTVV6U0wXEYN7J6IhuegVd7Ws\\\",\\\"weight\\\":1.7347691593488317e+24,\\\"target\\\":1.1686298893209502e+59,\\\"powHash\\\":\\\"000000000000000a85a38c16400713b116e968e2598497301ec7bd36665db51c\\\",\\\"id\\\":\\\"QmxvY2s6Z19vQjdIT2JuYk14dWxGUXlSYWg0a0hVYnNXenhlUVlIMnRDbnJsUk83UQ==\\\"}]},\\\"extensions\\\":{}}\"",
      "extensions": {
        "requestBody": {
          "query": "query Nodes {\n  nodes(\n    ids: [\"QmxvY2s6Z19vQjdIT2JuYk14dWxGUXlSYWg0a0hVYnNXenhlUVlIMnRDbnJsUk83UQ==\"]\n  ) {\n    id\n    ... on FungibleAccount {\n      id\n      accountName\n      fungibleName\n      totalBalance\n    }\n    ... on NonFungibleChainAccount {\n      id\n      accountName\n      chainId\n    }\n    ... on NonFungibleTokenBalance {\n      accountName\n      balance\n      chainId\n      id\n      tokenId\n      version\n    }\n    ... on Block {\n      id\n      hash\n      creationTime\n      difficulty\n      epoch\n      flags\n      height\n      nonce\n      payloadHash\n      weight\n      target\n      powHash\n    }\n    ... on Event {\n      id\n      name\n      height\n      moduleName\n      orderIndex\n      parameters\n      qualifiedName\n    }\n    ... on FungibleChainAccount {\n      id\n      accountName\n      chainId\n      fungibleName\n    }\n    ... on Transaction {\n      id\n      hash\n      result {\n        ... on TransactionResult {\n          badResult\n          continuation\n          eventCount\n          gas\n          goodResult\n          height\n          logs\n          metadata\n          transactionId\n        }\n      }\n    }\n    ... on Signer {\n      address\n      id\n      pubkey\n      scheme\n    }\n    ... on Transfer {\n      amount\n      blockHash\n      creationTime\n      height\n      id\n      moduleHash\n      moduleName\n      orderIndex\n      receiverAccount\n      requestKey\n      senderAccount\n    }\n  }\n}",
          "operationName": "Nodes"
        },
        "responseDetails": {
          "status": 200,
          "statusText": ""
        }
      }
    }
  ]
}

It should be working on our API in the next deploy.