Skip to main content
Solved

GraphQL - mutation to change permittedReadACL

  • August 27, 2026
  • 2 replies
  • 51 views

Hello, 

We are using Virtual Workspaces to manage the access to fact sheets. In this context, we are looking at automating the assignment of fact sheets to specific virtual workspaces by adding access control entities via a GraphQL mutation. 

Reading the ACL (permittedReadACL) is no problem. However, the patch applied in the mutation results in an error message indicating that “field with name 'permittedReadACL' on FactSheet type 'Application' is not defined in data model definition”.

Here is how what the mutation looks like. The idea is that we add a known control entity to the ACL list using its ID, similar to the approach for adding a tag to the tags list (using path “/tags/-”).
Although we can read the permittedReadACL, it seems that the updateFactSheet function is not considering it as part of the data model … at least not with the approach used here.
 

mutation ChangePermittedReadACL($id: ID!, $patches: [Patch]!) {

  updateFactSheet(id: $id, patches: $patches) {

    factSheet {

      ... on Application {

        id

        name

        permittedReadACL {

            id

            name

            __typename

        }

        updatedAt

      }

    }

  }

}

Variables: (Note: IDs are masked)

{

  "id": "51edf0e5-b97a-4466-8cea-XXXXXXXXXXX",

  "patches": [

    {

      "op": "add",

      "path": "/permittedReadACL/-",        // Append to the list

      "value": "{id: 'fc1428a2-d711-4758-af40-XXXXXXXXXXXX'}" //Access Control Entity Reference

    }

  ]

}

Best answer by Paulo Vilar

Hi,

This is how we do it, hope it helps:

 

{
"query": "mutation ($patches: [Patch]!) { updateFactSheet(id: \"xxxxxx-xxxx-xxxx-xxxxx-xxxxxxxx\", patches: $patches) { factSheet { id } }}",
"variables": {
"patches": [
{
"op": "replace",
"path": "/permittedReadACL",
"value": "[{\"name\": \"MYACL\"}]"
},
{
"op": "replace",
"path": "/permittedWriteACL",
"value": "[]"
}
]
}
}

Br,

Paulo

2 replies

Paulo Vilar
Forum|alt.badge.img
  • Royalty For Loyalty
  • Answer
  • August 28, 2026

Hi,

This is how we do it, hope it helps:

 

{
"query": "mutation ($patches: [Patch]!) { updateFactSheet(id: \"xxxxxx-xxxx-xxxx-xxxxx-xxxxxxxx\", patches: $patches) { factSheet { id } }}",
"variables": {
"patches": [
{
"op": "replace",
"path": "/permittedReadACL",
"value": "[{\"name\": \"MYACL\"}]"
},
{
"op": "replace",
"path": "/permittedWriteACL",
"value": "[]"
}
]
}
}

Br,

Paulo


  • Author
  • Rookie
  • August 31, 2026

Thank you Paulo for your example!

It seems that “replace” is the only operation implemented for the ACL and it is only possible to replace the entire list, but not just append an item. Your example also works with using the “id” instead of the “name” (see below). 

 

mutation ReplacePermittedReadACL($id: ID!, $patches: [Patch]!) {

  updateFactSheet(id: $id, patches: $patches) {

    factSheet {

      id

    }

  }

}

Variables:

{

  "id": "51edf0e5-b97a-4466-8cea-XXXXXXXXX",

  "patches": [

    {

      "op": "replace",

      "path": "/permittedReadACL",

      "value": "[{\"id\": \"fc1428a2-d711-4758-af40-XXXXXXXXX\"}]"

    }

  ]

}