mutation CreateMaintenanceSchedule($input: CreateMaintenanceScheduleInput!) {
createMaintenanceSchedule(input: $input) {
assignedUser {
allowedLocations {
children {
__typename
}
id
isSite
location
parentId
tags
}
avatarUrl
department
email
firstName
groups {
createdAt
id
name
users {
__typename
}
}
}
description
equipment {
additionalDetails
eventTemplates {
__typename
}
id
image
interactions {
byKnown
byUser
documents
equipmentId
id
notes
}
location {
children {
__typename
}
id
isSite
location
parentId
tags
}
}
equipmentId
id
inspectionTemplateId
}
}{
"input": {
"equipmentId": "string",
"firstMaintenanceAt": "value",
"maintenanceType": "string",
"recurrence": "string"
}
}{
"data": {
"createMaintenanceSchedule": {
"assignedUser": {
"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"
}
]
}
]
},
"description": "string",
"equipment": {
"additionalDetails": "value",
"eventTemplates": [
{
"__typename": "EventTemplate"
}
],
"id": "string",
"image": "string",
"interactions": [
{
"byKnown": "string",
"byUser": "string",
"documents": [
"string"
],
"equipmentId": "string",
"id": "string",
"notes": "string"
}
],
"location": {
"children": [
{
"__typename": "Location"
}
],
"id": 1,
"isSite": true,
"location": "string",
"parentId": 1,
"tags": [
"string"
]
}
},
"equipmentId": "string",
"id": "string",
"inspectionTemplateId": "string"
}
}
}createMaintenanceSchedule
Creates a recurring maintenance schedule for a piece of equipment and returns it as an event template.
createMaintenanceSchedule(input: CreateMaintenanceScheduleInput!): EventTemplate!Arguments
The schedule to create.
Returns
The user the schedule's events are assigned to.
Longer text describing the schedule.
The equipment the schedule maintains.
Id of the equipment the schedule maintains.
Unique identifier of the schedule.
Id of the inspection template run for each of the schedule's events.
When the schedule's next upcoming event starts.
Free-text notes on the schedule.
Recurrence rule in iCalendar RRULE syntax, for example 'FREQ=MONTHLY;INTERVAL=3'.
Title given to each event the schedule generates.
Kind of event the schedule generates: one of 'INSPECTION' (Inspection), 'TRAINING' (Training), 'INCIDENT' (Incident), 'PERMIT' (Permit deadline), 'EQUIPMENT' (Equipment maintenance), 'REPORTING' (Report deadline) or 'IBC' (IBC meeting).
mutation CreateMaintenanceSchedule($input: CreateMaintenanceScheduleInput!) {
createMaintenanceSchedule(input: $input) {
assignedUser {
allowedLocations {
children {
__typename
}
id
isSite
location
parentId
tags
}
avatarUrl
department
email
firstName
groups {
createdAt
id
name
users {
__typename
}
}
}
description
equipment {
additionalDetails
eventTemplates {
__typename
}
id
image
interactions {
byKnown
byUser
documents
equipmentId
id
notes
}
location {
children {
__typename
}
id
isSite
location
parentId
tags
}
}
equipmentId
id
inspectionTemplateId
}
}{
"input": {
"equipmentId": "string",
"firstMaintenanceAt": "value",
"maintenanceType": "string",
"recurrence": "string"
}
}{
"data": {
"createMaintenanceSchedule": {
"assignedUser": {
"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"
}
]
}
]
},
"description": "string",
"equipment": {
"additionalDetails": "value",
"eventTemplates": [
{
"__typename": "EventTemplate"
}
],
"id": "string",
"image": "string",
"interactions": [
{
"byKnown": "string",
"byUser": "string",
"documents": [
"string"
],
"equipmentId": "string",
"id": "string",
"notes": "string"
}
],
"location": {
"children": [
{
"__typename": "Location"
}
],
"id": 1,
"isSite": true,
"location": "string",
"parentId": 1,
"tags": [
"string"
]
}
},
"equipmentId": "string",
"id": "string",
"inspectionTemplateId": "string"
}
}
}