Hi
I'm kind of stuck on implementing a mutation in graphql that modifies a property by adding multiple URIs for the same predicate.
For example I wanted to add multiple subjects (dct:subject) to a single resource, I would need a parameter $subjectURIs:[ID] and implement it into the query. I am using Apollo Graphql as a middleware solution, but whatever I try - I keep getting errors in my syntax.
Unfortunately I cannot find any documentation on how to use RootRDFMution with addValues for example. Is there any documentation or more examples?
Example:
export const UPDATE_ExampleResource = gql`
mutation exampleResourceMutation ($uri:ID, $subjectUri:[ID]) {
updateExampleResource ( input: {
uri: $uri
subject: {
uri: $subjectUri
}
})
report {
addedCount
deletedCount
}
commit (message: "added subjects")
}
`;
I have also been looking at addValues but I am not sure how to implement this:
addValues(
resource: $uri,
predicate: "subject",
values:$subjectUri
)
Many thanks