olaf
08/09/2017, 7:18 AMpost
, for that it needs to compare the new values against the old to specify what exactly changed.
It works well for scalar fields, but having trouble with relations.
(By the way, am aware that the function itself won’t trigger from a change in the relation, will address that with the Dummy field workaround)
What I have now:
subscription {
Post(filter: {
mutation_in: [CREATED, UPDATED, DELETED]
}) {
updatedFields
node {
id
name
admins {id}
}
previousValues {
id
name
admins: id
}
}
}
So far updatedFields
will give all admins on the post, but previousValues
doesn’t and will not accept the same format. It does give the id of 1 admin when formatted as above.pcooney10
08/09/2017, 8:22 PMpcooney10
08/09/2017, 8:22 PMpcooney10
08/09/2017, 8:25 PMolaf
08/10/2017, 2:51 AM