joystream icon indicating copy to clipboard operation
joystream copied to clipboard

Query node: internal server error on Connection query with enums.

Open shamil-gadelshin opened this issue 3 years ago • 2 comments

The issue originated from the Storage Node (Giza release). Hydra version: 3.1.0-alpha.13

Graphql

fragment StorageBucketDetails on StorageBucket {
  id
  operatorMetadata{
    nodeEndpoint
  } 
  operatorStatus {
    ... on StorageBucketOperatorStatusActive {
      workerId
    }
    ... on StorageBucketOperatorStatusInvited {
      workerId
    }
  }
}

query getStorageBucketsConnection {
  storageBucketsConnection{
    edges {
      cursor
      node {
        ...StorageBucketDetails
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
    totalCount
  }
}

query getStorageBucketDetails($workerId:ID = 0, $offset: Int, $limit: Int) {
  storageBuckets(where: {
    operatorStatus_json: { 
      isTypeOf_eq: "StorageBucketOperatorStatusActive"
      workerId_eq: $workerId 
    }
    operatorMetadata: { nodeEndpoint_startsWith: "http" }
  }
    offset: $offset, limit: $limit) {
    ...StorageBucketDetails
  }
}

The simple related query above works.

Error

{
  "errors": [
    {
      "message": "Cannot return null for non-nullable field StorageBucket.operatorStatus.",
      "locations": [
        {
          "line": 6,
          "column": 3
        }
      ],
      "path": [
        "storageBucketsConnection",
        "edges",
        0,
        "node",
        "operatorStatus"
      ],
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR"
      }
    }
  ],
  "data": null
}

shamil-gadelshin avatar Nov 03 '21 08:11 shamil-gadelshin

Probably fix is created in Hydra. No one experienced this for a long time. Assigning to Zeeshan

dmtrjsg avatar Aug 12 '22 11:08 dmtrjsg

Similar error: https://github.com/Joystream/joystream/issues/2874

dmtrjsg avatar Aug 12 '22 11:08 dmtrjsg