Query
query TrainingSites($trainingId: String!) {
trainingSites(trainingId: $trainingId) {
children {
__typename
}
id
isSite
location
parentId
tags
}
}Variables
{
"trainingId": "string"
}Response
{
"data": {
"trainingSites": [
{
"children": [
{
"__typename": "Location"
}
],
"id": 1,
"isSite": true,
"location": "string",
"parentId": 1,
"tags": [
"string"
]
}
]
}
}Queries
trainingSites
The sites a training is restricted to. An empty list means the training is available at every site.
QUERY
trainingSites(trainingId: String!): [Location!]!Arguments
trainingId
String!
required
Id of the training.
Returns
[Location!]!
children
[Location!]!
Locations directly under this one. Empty if there are no child locations.
id
Int!
Id of the location.
isSite
Boolean!
True when the location is a site.
location
String!
Name of the location.
parentId
Int
Id of the location this one sits under.
tags
[String!]
Where the location can be picked: any of 'inventory' (Inventory), 'inspections' (Inspections) or 'incidents' (Incidents). Empty if there are no tags.
Query
query TrainingSites($trainingId: String!) {
trainingSites(trainingId: $trainingId) {
children {
__typename
}
id
isSite
location
parentId
tags
}
}Variables
{
"trainingId": "string"
}Response
{
"data": {
"trainingSites": [
{
"children": [
{
"__typename": "Location"
}
],
"id": 1,
"isSite": true,
"location": "string",
"parentId": 1,
"tags": [
"string"
]
}
]
}
}