S_keys

Supported arguments

The following arguments are supported by S_keys query:

FieldTypeDescription
afterStringReturns the elements that come after the specified cursor
firstIntReturns up to the first n elements from the list
stockIdS_UuidThe ID of the stock item. Either this argument, "stockId" or "orderNumber" is required.
stateS_KeyStateThe state of keys. If NULL provided - all state keys will be returned
sortS_API_KeysSortKeys sorting option. Default to oldest first
ids[S_Uuid!]IDs of requested keys. Either this argument, "stockId", "orderNumber" or "ordersNumbers" is required.
orderNumberStringAssociated order number. Either this argument, "stockId", "ordersNumbers" or "ids" is required.
ordersNumbers[String!]Associated orders numbers. Either this argument, "stockId", "orderNumber" or "ids" is required.

Return type

The query returns the S_API_KeyConnection type.

Example usage

You can get auction's keys by performing S_keys query with your auction ID and (optional) state.

Query

Get your auction's active keys.

{
  S_keys(stockId: "ffffffff-23bc-11e9-9c94-ffffffffffff", state: ACTIVE) {
    edges {
      node {
        id
        value
        state
      }
    }
  }
}

Result

{
  "data": {
    "S_keys": {
      "edges": [
        {
          "node": {
            "id": "ffffffff-691e-11ea-afc4-ffffffffffff",
            "value": "first-key",
            "state": "ACTIVE"
          }
        },
        {
          "node": {
            "id": "ffffffff-691e-11ea-b590-ffffffffffff",
            "value": "second-key",
            "state": "ACTIVE"
          }
        }
      ]
    }
  }
}

Query

Get your auction's reported keys.

{
  S_keys(state: REPORTED, stockId: "ffffffff-3c55-11ea-aedd-ffffffffffff") {
    edges {
      node {
        id
        reportReason
      }
    }
  }
}

Result

{
  "data": {
    "S_keys": {
      "edges": [
        {
          "node": {
            "id": "ffffffff-3c58-11ea-af1e-ffffffffffff",
            "reportReason": "Part of the key was not visible"
          }
        }
      ]
    }
  }
}

Query

Get keys by IDs.

{
  S_keys(ids: [ "1bd07056-ffff-11ab-eeee-295c93cf53bd", "ggggc3f0-7260-1cee-ac76-eeee38eff69b" ]) {
    edges {
      node {
        id
        value
        state
      }
    }
  }
}

Result

{
  "data": {
    "S_keys": {
      "edges": [
        {
          "node": {
            "id": "1bd07056-ffff-11ab-eeee-295c93cf53bd",
            "value": "first-key",
            "state": "SOLD"
          }
        },
        {
          "node": {
            "id": "ggggc3f0-7260-1cee-ac76-eeee38eff69b",
            "value": "second-key",
            "state": "SOLD"
          }
        }
      ]
    }
  }
}
Copyright 2024 Eneba. All Rights Reserved. JSC “Helis play”, Gyneju St. 4-333, Vilnius, the Republic of Lithuania