Query
query Policies {
policies {
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
}
}Response
{
"data": {
"policies": [
{
"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
policies
The latest published version and any open draft of every policy in the organization. Empty if there are no policies.
QUERY
policies(search: String, siteId: Int): [Policy!]!Arguments
search
String
Text matched against policy names and descriptions.
siteId
Int
Id of the site to limit the list to.
Returns
[Policy!]!
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 Policies {
policies {
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
}
}Response
{
"data": {
"policies": [
{
"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"
}
]
}
}