Mutation
mutation EditPolicy($id: String!, $input: EditPolicyInput!, $version: Int!) {
editPolicy(id: $id, input: $input, version: $version) {
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",
"input": {},
"version": 1
}Response
{
"data": {
"editPolicy": {
"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
editPolicy
Updates the name, description, author or file of a policy version and returns it.
MUTATION
editPolicy(id: String!, input: EditPolicyInput!, version: Int!): Policy!Arguments
id
String!
required
Id of the policy to edit.
input
required
The changes to apply.
version
Int!
required
Version of the policy to edit.
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 EditPolicy($id: String!, $input: EditPolicyInput!, $version: Int!) {
editPolicy(id: $id, input: $input, version: $version) {
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",
"input": {},
"version": 1
}Response
{
"data": {
"editPolicy": {
"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"
}
}
}