Query
query PermitCycles {
permitCycles {
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
}
}Response
{
"data": {
"permitCycles": [
{
"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
permitCycles
Every permit cycle in the organization.
QUERY
permitCycles: [PermitCycle!]!Returns
[PermitCycle!]!
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 PermitCycles {
permitCycles {
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
}
}Response
{
"data": {
"permitCycles": [
{
"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"
}
]
}
}