Editing a Relationship
I have a form that contains a related record for which I want to submit data at the same time. For this I have set up:
I need to perform a mutation to add extra data when saving, but I can't find a way to do this on the relationship. Does anyone have any suggested on how I can achieve this?
1 Reply
It turns out there was a flaw in my thinking about the record relationship:
Even though I was peforming a main record
edit
, the relationship didn't exist yet, and was therefore calling a different function to what I was expecting:
This is correct approach for a new relation, where I was incorrectly using
mutateRelationshipDataBeforeSaveUsing
which only works when the relation already exists.