Query
query Policy($id: String!) {
policy(id: $id) {
author {
allowedLocations {
children {
__typename
}
id
isSite
location
parentId
tags
}
avatarUrl
department
email
firstName
groups {
createdAt
id
name
users {
__typename
}
}
}
description
file {
id
url
}
id
name
orgId
}
}Variables
{
"id": "string"
}Response
{
"data": {
"policy": {
"author": {
"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",
"file": {
"id": "string",
"url": "string"
},
"id": "string",
"name": "string",
"orgId": "string"
}
}
}Queries
policy
One version of a policy, the latest when no version is given.
QUERY
policy(id: String!, version: Int): PolicyArguments
id
String!
required
Id of the policy.
version
Int
Version of the policy to return.
Returns
author
User!
The user named as the author of the policy.
description
String
Description of the policy.
file
The document attached to this version of the policy.
id
String!
Id of the policy, shared by all of its versions.
name
String!
Name of the policy.
orgId
String!
Id of the organization the policy belongs to.
siteNames
[String!]!
Names of the sites the policy is restricted to. Empty if there are no site restrictions.
status
String!
One of 'DRAFT' (Draft) or 'PUBLISHED' (Published).
updatedAt
DateTime!
When this version of the policy was last changed.
version
Int!
Version number of the policy.
Query
query Policy($id: String!) {
policy(id: $id) {
author {
allowedLocations {
children {
__typename
}
id
isSite
location
parentId
tags
}
avatarUrl
department
email
firstName
groups {
createdAt
id
name
users {
__typename
}
}
}
description
file {
id
url
}
id
name
orgId
}
}Variables
{
"id": "string"
}Response
{
"data": {
"policy": {
"author": {
"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",
"file": {
"id": "string",
"url": "string"
},
"id": "string",
"name": "string",
"orgId": "string"
}
}
}