Closed Swahvay closed 5 months ago
So, I figured out what the problem is here. The generated action now has a 3rd parameter, which is the actionOnlyFields, but that changes this from only allowing one edge to be created per action. Previously I could do this in my trigger:
const action = AddSomeEdgeToEntAction.create(
viewer,
ent,
);
edgeIDsToAdd.forEach(id => action.addSomeEdgeToEntID(id));
return action.changeset();
But I think now I have to do:
return Promise.all(edgeIDsToAdd.map(id => (
AddSomeEdgeToEntAction.create(
viewer,
ent,
{ dataToSave: id + 'foo' },
)
.addSomeEdgeToEntID(id)
.changeset(),
));
Is that right?
I have an edge defined as:
But the
AddSomeEdgeAction
and its corresponding base never generate the input type withverificationNumber
. I want to use it to add a trigger that callsbuilder.storeData
so it can store it on the edge row.