Query
query PermitCycle($id: String!) {
permitCycle(id: $id) {
createdAt
currentPermit {
actions {
assigned {
__typename
}
assignment {
__typename
}
canChangeStatus
completedDate
createdAt
dueDate
}
createdAt
dueDate
events {
action {
__typename
}
assigned {
__typename
}
description
id
incident {
__typename
}
inspectionResult {
__typename
}
}
expiryDate
id
}
description
id
issuingAgency {
contacts {
email
id
name
}
id
location
name
}
name
}
}Variables
{
"id": "string"
}Response
{
"data": {
"permitCycle": {
"createdAt": "value",
"currentPermit": {
"actions": [
{
"assigned": {
"__typename": "User"
},
"assignment": {
"__typename": "ActionToTrainingAssignment"
},
"canChangeStatus": true,
"completedDate": "value",
"createdAt": "value",
"dueDate": "value"
}
],
"createdAt": "value",
"dueDate": "value",
"events": [
{
"action": {
"__typename": "Action"
},
"assigned": {
"__typename": "User"
},
"description": "string",
"id": "string",
"incident": {
"__typename": "Incident"
},
"inspectionResult": {
"__typename": "InspectionResult"
}
}
],
"expiryDate": "value",
"id": "string"
},
"description": "string",
"id": "string",
"issuingAgency": {
"contacts": [
{
"email": "string",
"id": "string",
"name": "string"
}
],
"id": "string",
"location": "string",
"name": "string"
},
"name": "string"
}
}
}Queries
permitCycle
The permit cycle with the given id.
QUERY
permitCycle(id: String!): PermitCycleArguments
id
String!
required
Id of the permit cycle to return.
Returns
createdAt
DateTime!
When the cycle was created.
currentPermit
The permit record currently in force for this cycle.
description
String
Free-text description of the permit.
id
String!
Unique identifier of the permit cycle.
issuingAgency
The agency that issues the permit.
name
String!
Name of the permit, for example 'Flammable Materials Storage'.
permitNumber
String!
Permit or licence number as issued by the agency, for example 'FD-FM-2023-4829'.
permits
[Permit!]!
Every permit record in the cycle, including currentPermit.
type
String
Free-text category of the permit.
updatedAt
DateTime!
When the cycle was last modified.
Query
query PermitCycle($id: String!) {
permitCycle(id: $id) {
createdAt
currentPermit {
actions {
assigned {
__typename
}
assignment {
__typename
}
canChangeStatus
completedDate
createdAt
dueDate
}
createdAt
dueDate
events {
action {
__typename
}
assigned {
__typename
}
description
id
incident {
__typename
}
inspectionResult {
__typename
}
}
expiryDate
id
}
description
id
issuingAgency {
contacts {
email
id
name
}
id
location
name
}
name
}
}Variables
{
"id": "string"
}Response
{
"data": {
"permitCycle": {
"createdAt": "value",
"currentPermit": {
"actions": [
{
"assigned": {
"__typename": "User"
},
"assignment": {
"__typename": "ActionToTrainingAssignment"
},
"canChangeStatus": true,
"completedDate": "value",
"createdAt": "value",
"dueDate": "value"
}
],
"createdAt": "value",
"dueDate": "value",
"events": [
{
"action": {
"__typename": "Action"
},
"assigned": {
"__typename": "User"
},
"description": "string",
"id": "string",
"incident": {
"__typename": "Incident"
},
"inspectionResult": {
"__typename": "InspectionResult"
}
}
],
"expiryDate": "value",
"id": "string"
},
"description": "string",
"id": "string",
"issuingAgency": {
"contacts": [
{
"email": "string",
"id": "string",
"name": "string"
}
],
"id": "string",
"location": "string",
"name": "string"
},
"name": "string"
}
}
}