Sublocations
Schema​
Sublocation
​
Name | Type | Description | Example |
---|---|---|---|
description | string? | The description of the sublocation | "My description" |
displayId | ID | The display for the sublocation | "A1-B2" |
id | ID | The unique sublocation ID | "ckmnpybisiy5x08abky4g2d1f" |
locationId | ID | The ID of the location | "ckmnpybisiy5x08abky4g2d1f" |
location | Location | The location | See the Location docs |
parentId | ID? | The ID of the parent location | "ckmnpybisiy5x08abky4g2d1f" |
updatedAt | DateTime | When this location was last updated | "2021-03-24 17:26:46.983Z" |
Queries​
sublocation
​
Used to read a single sublocation.
Parameters​
Name | Description | Example |
---|---|---|
id | The ID of the sublocation to fetch | "ckmnpybisiy5x08abky4g2d1f" |
Response​
A single Sublocation
object.
Example Query​
query {
sublocation(id: "ckmnpybisiy5x08abky4g2d1f") {
id
displayId
}
}
Example Response​
{
"id": "ckmnpybisiy5x08abky4g2d1f",
"displayId": "A1"
}
sublocations
​
Read all sublocations, with pagination.
Parameters​
Accepts all standard pagination parameters.
Allowed orderBy fields: createdAt
, id
, updatedAt
.
Allowed filter fields: createdAt
, id
, locationId
, parentId
, updatedAt
.
Response​
A list of Sublocation
objects.
Example Query​
query {
sublocations(limit: 10) {
id
path
}
}
Example Response​
[
{
"id": "ckmnpybisiy5x08abky4g2d1f",
"path": "A1-B2"
},
{
"id": "ckmnpyirsiy8c04abky2g2d5c",
"path": "A5-B9"
}
]