Query
query Inspection($id: String!) {
inspection(id: $id) {
completionAction {
assigned {
allowedLocations {
__typename
}
avatarUrl
department
email
firstName
groups {
__typename
}
}
assignment {
action {
__typename
}
actionId
assignment {
__typename
}
assignmentId
present
progressPct
}
canChangeStatus
completedDate
createdAt
dueDate
}
createdAt
id
inspectionDate
inspector {
allowedLocations {
children {
__typename
}
id
isSite
location
parentId
tags
}
avatarUrl
department
email
firstName
groups {
createdAt
id
name
users {
__typename
}
}
}
inspectorId
}
}Variables
{
"id": "string"
}Response
{
"data": {
"inspection": {
"completionAction": {
"assigned": {
"allowedLocations": [
{
"__typename": "Location"
}
],
"avatarUrl": "string",
"department": "string",
"email": "string",
"firstName": "string",
"groups": [
{
"__typename": "UserGroup"
}
]
},
"assignment": {
"action": {
"__typename": "Action"
},
"actionId": "id",
"assignment": {
"__typename": "TrainingAssignment"
},
"assignmentId": "id",
"present": true,
"progressPct": 1
},
"canChangeStatus": true,
"completedDate": "value",
"createdAt": "value",
"dueDate": "value"
},
"createdAt": "value",
"id": "string",
"inspectionDate": "value",
"inspector": {
"allowedLocations": [
{
"children": [
{
"__typename": "Location"
}
],
"id": 1,
"isSite": true,
"location": "string",
"parentId": 1,
"tags": [
"string"
]
}
],
"avatarUrl": "string",
"department": "string",
"email": "string",
"firstName": "string",
"groups": [
{
"createdAt": "value",
"id": "string",
"name": "string",
"users": [
{
"__typename": "User"
}
]
}
]
},
"inspectorId": "string"
}
}
}Queries
inspection
The inspection with the given id.
QUERY
inspection(id: String!): InspectionResultArguments
id
String!
required
Id of the inspection to return.
Returns
completionAction
The action that records the completion of the inspection.
createdAt
DateTime!
When the inspection result was created.
id
String!
Id of the inspection result.
inspectionDate
DateTime!
When the inspection took place.
inspector
User!
The user who carried out the inspection.
inspectorId
String!
Id of the user who carried out the inspection.
location
The location inspected.
orgId
String!
Id of the organization the inspection belongs to.
organization
The organization the inspection belongs to.
questionResponses
[QuestionResponse!]!
Responses to the template's questions. Empty if there are no responses.
status
String!
One of 'DRAFT' (Draft) or 'COMPLETED' (Completed).
template
The inspection template the inspection follows.
templateId
String!
Id of the inspection template the inspection follows.
Query
query Inspection($id: String!) {
inspection(id: $id) {
completionAction {
assigned {
allowedLocations {
__typename
}
avatarUrl
department
email
firstName
groups {
__typename
}
}
assignment {
action {
__typename
}
actionId
assignment {
__typename
}
assignmentId
present
progressPct
}
canChangeStatus
completedDate
createdAt
dueDate
}
createdAt
id
inspectionDate
inspector {
allowedLocations {
children {
__typename
}
id
isSite
location
parentId
tags
}
avatarUrl
department
email
firstName
groups {
createdAt
id
name
users {
__typename
}
}
}
inspectorId
}
}Variables
{
"id": "string"
}Response
{
"data": {
"inspection": {
"completionAction": {
"assigned": {
"allowedLocations": [
{
"__typename": "Location"
}
],
"avatarUrl": "string",
"department": "string",
"email": "string",
"firstName": "string",
"groups": [
{
"__typename": "UserGroup"
}
]
},
"assignment": {
"action": {
"__typename": "Action"
},
"actionId": "id",
"assignment": {
"__typename": "TrainingAssignment"
},
"assignmentId": "id",
"present": true,
"progressPct": 1
},
"canChangeStatus": true,
"completedDate": "value",
"createdAt": "value",
"dueDate": "value"
},
"createdAt": "value",
"id": "string",
"inspectionDate": "value",
"inspector": {
"allowedLocations": [
{
"children": [
{
"__typename": "Location"
}
],
"id": 1,
"isSite": true,
"location": "string",
"parentId": 1,
"tags": [
"string"
]
}
],
"avatarUrl": "string",
"department": "string",
"email": "string",
"firstName": "string",
"groups": [
{
"createdAt": "value",
"id": "string",
"name": "string",
"users": [
{
"__typename": "User"
}
]
}
]
},
"inspectorId": "string"
}
}
}