cardano-graphql icon indicating copy to clipboard operation
cardano-graphql copied to clipboard

Cannot return null for non-nullable field Redeemer.scriptHash

Open alecalve opened this issue 1 year ago • 3 comments

Summary

This error happened first when querying this transaction with the following GraphQL query:

query Query($txHash: Hash32Hex) {
    transactions(where: {hash: {_eq: $txHash}}) {
        redeemers {
            scriptHash
        }
    }
}

Steps to reproduce the bug

Run the query against a Cardano graphql instance

Actual Result

See the following error:

Error(
    message = Cannot return null for non-nullable field Redeemer.scriptHash., 
    locations = [Location(line = 1, column = 115)], 
    customAttributes = {path=[transactions, 0, redeemers, 0, scriptHash], 
    extensions={
        code=INTERNAL_SERVER_ERROR, 
        exception={
            stacktrace=[
                Error: Cannot return null for non-nullable field Redeemer.scriptHash.,     
                at completeValue (/app/node_modules/graphql/execution/execute.js:560:13),     
                at completeValueCatchingError (/app/node_modules/graphql/execution/execute.js:495:19),     
                at resolveField (/app/node_modules/graphql/execution/execute.js:435:10),     
                at executeFields (/app/node_modules/graphql/execution/execute.js:275:18),     
                at collectAndExecuteSubfields (/app/node_modules/graphql/execution/execute.js:713:10),     
                at completeObjectValue (/app/node_modules/graphql/execution/execute.js:703:10),     
                at completeValue (/app/node_modules/graphql/execution/execute.js:591:12),     
                at completeValueCatchingError (/app/node_modules/graphql/execution/execute.js:495:19),     
                at /app/node_modules/graphql/execution/execute.js:618:25,     
                at Array.forEach (<anonymous>)
            ]
        }
    }
})

Expected Result

We'd expect to get a successful output.

Environment

    image: ghcr.io/intersectmbo/cardano-node:9.1.0
    image: cardanosolutions/ogmios:v6.5.0
    image: ghcr.io/intersectmbo/cardano-db-sync:13.5.0.0
    image: postgres:14-alpine
    image: cardanofoundation/cardano-graphql-hasura:8.2.0
    image: cardanofoundation/cardano-graphql-background:8.2.0-mainnet
    image: cardanofoundation/cardano-graphql:8.2.1

Platform

  • [X] Linux (Ubuntu)
  • [ ] Linux (Other)
  • [ ] macOS
  • [ ] Windows

Platform version

No response

Runtime

  • [ ] Node.js
  • [X] Docker

Runtime version

No response

alecalve avatar Sep 09 '24 09:09 alecalve