-
Notifications
You must be signed in to change notification settings - Fork 106
Description
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 }