Mutation
mutation CreatePolicy($input: CreatePolicyInput!) {
createPolicy(input: $input) {
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
{
"input": {
"description": "string",
"name": "string"
}
}Response
{
"data": {
"createPolicy": {
"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"
}
}
}Mutations
createPolicy
Creates a policy as a draft and returns it.
MUTATION
createPolicy(input: CreatePolicyInput!): Policy!Arguments
input
required
The policy to create.
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.
Mutation
mutation CreatePolicy($input: CreatePolicyInput!) {
createPolicy(input: $input) {
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
{
"input": {
"description": "string",
"name": "string"
}
}Response
{
"data": {
"createPolicy": {
"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"
}
}
}