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
}
]
}