Skip to content

utxo_aggregate sum error #801

@awesome9999

Description

@awesome9999

I am trying to send this query to get amount of NFTs locked on address by policyId:
query { utxos_aggregate( where: { _and: { address: { _eq: $address }, tokens: { asset: { policyId: { _eq: "d6fe6efa7788cb70e57a91891605e3694352cabb4837e870610300e9"} } } } } ){ aggregate { sum { tokens { quantity } } } } }
It works well with count aggregate, but in case of sum aggregate it returns this error:

{ "errors": [ { "message": "Cannot return null for non-nullable field Query.utxos_aggregate.", "locations": [ { "line": 2, "column": 3 } ], "path": [ "utxos_aggregate" ], "extensions": { "code": "INTERNAL_SERVER_ERROR", "exception": { "stacktrace": [ "Error: Cannot return null for non-nullable field Query.utxos_aggregate.", " 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 executeOperation (/app/node_modules/graphql/execution/execute.js:219:122)", " at executeImpl (/app/node_modules/graphql/execution/execute.js:104:14)", " at Object.execute (/app/node_modules/graphql/execution/execute.js:64:35)", " at /app/node_modules/apollo-server-core/dist/requestPipeline.js:261:48", " at Generator.next (<anonymous>)", " at /app/node_modules/apollo-server-core/dist/requestPipeline.js:8:71" ] } } } ], "data": null }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions