Closed rafaeldkb closed 3 weeks ago
@mschead I'm trying to retrieve information from a transaction using a requestkey and it says it doesn't find the request key.
Query:
query Transaction($requestKey: String!) { transaction(requestKey: $requestKey) { cmd { transactionId } } } }
Response: "errors": [ { "message": "Transfer with id 89nwsbqyqg9XwrTOnHWtAb-KTpdKTYg0Q5LTpLK5X7M not found", "locations": [ { "line": 2, "column": 3 } ], "path": [ "transaction" ], "extensions": { "code": "INTERNAL_SERVER_ERROR", "exception": { "stacktrace": [ "Error: Transfer with id 89nwsbqyqg9XwrTOnHWtAb-KTpdKTYg0Q5LTpLK5X7M not found", " at TransactionDbRepository.getTransactionByRequestKey (/app/dist/kadena-server/repository/infra/repository/transaction-db-repository.js:147:19)", " at process.processTicksAndRejections (node:internal/process/task_queues:95:5)", " at async Object.transactionQueryResolver [as transaction] (/app/dist/kadena-server/resolvers/query/transaction-query-resolver.js:8:20)" ] } } } ], "data": { "transaction": null } }
@mschead i'm trying to retrieve "id" and "hash" from transactions query, using the "edge" field, and its not returning any value.
Query query Transactions($requestKey: String) { transactions(requestKey: $requestKey) { edges { node { id hash } } } }
Response { "data": { "transactions": { "edges": [] } } }
the same return happens if I query using the AccountName:
query Transactions($accountName: String) { transactions(accountName: $accountName) { edges { node { id hash } } } } }
And again, when trying to retrieve data from with "edge" it doesn't return anything, see query below with blocks: query Block($hash: String!) { block(hash: $hash) { events { edges { node { requestkey qualifiedName parameters } } } } }
returned: { "data": { "block": { "events": { "edges": [] } } } }
When I try to retrieve "Parent" from the block query it doesn't show any data option
query Block($hash: String!) { block(hash: $hash) { parent {
}
} }
like, what should I add in the line below? i thought it was supposed to show some data options, and there's not really a variable
Making queries for total count of events inside blocks is returning 0 events, even though I know there were several transactions on the block (hash used: "Mm4o2NTaln9yEpZAIuMvbg-9yMuc3B49xwJgCiJv7Y8")
Query query Block($hash: String!) { block(hash: $hash) { events { totalCount } } } }
Return { "data": { "block": { "events": { "totalCount": 0 } } } }
I don't really know what are the options to add for the variable "qualifiedEventName", and it seems its a requirement to query events, could you explain?
Query query Events($qualifiedEventName: String!) { events(qualifiedEventName: $qualifiedEventName) { blockHash } }
the query "CompletedBlockHeights" is returning null, with error.
Query query CompletedBlockHeights { completedBlockHeights { edges { node { chainId } } } }
Return { "errors": [ { "message": "Cannot return null for non-nullable field Query.completedBlockHeights.", "locations": [ { "line": 2, "column": 3 } ], "path": [ "completedBlockHeights" ], "extensions": { "code": "INTERNAL_SERVER_ERROR", "exception": { "stacktrace": [ "Error: Cannot return null for non-nullable field Query.completedBlockHeights.", " at completeValue (/app/node_modules/graphql/execution/execute.js:559:13)", " at resolveField (/app/node_modules/graphql/execution/execute.js:472:19)", " at executeFields (/app/node_modules/graphql/execution/execute.js:292:18)", " at executeOperation (/app/node_modules/graphql/execution/execute.js:236:122)", " at executeImpl (/app/node_modules/graphql/execution/execute.js:116:14)", " at execute (/app/node_modules/graphql/execution/execute.js:60:35)", " at execute (/app/node_modules/apollo-server-core/dist/requestPipeline.js:207:48)", " at processGraphQLRequest (/app/node_modules/apollo-server-core/dist/requestPipeline.js:150:34)", " at process.processTicksAndRejections (node:internal/process/task_queues:95:5)", " at async processHTTPRequest (/app/node_modules/apollo-server-core/dist/runHttpQuery.js:222:30)" ] } } } ], "data": null }
Issue 1
Make sure to use query like this. This baselineTransaction
is something new that I added yesterday.
Issue 2
Issue 3
Issue 4
Issue 5
The parent is the block parent of the current block you're fetching. You should be able to get all the fields of a block, as you can see on this list. I'm not sure if you're using mac or windows, but if you click CMD + space or CTRL + space, the list will open.
Issue 6
I found that it was missing the implementation of the total count for transactions and events of a block. I will fix it. However, I did the query on the kadscan using the hash (Mm4o2NTaln9yEpZAIuMvbg-9yMuc3B49xwJgCiJv7Y8) you mentioned and it returned no results. I did on the database as well and I got the same thing.
Issue 7
It's the combination of module and name columns. An example is coin.TRANSFER
.
Issue 8
I will finish the completedBlockHeights query. This one is pending.
Test API as a user