how would i calculate a variable during a mutation? is this even possible:
mutation CreateNewQuote(
$customerId: ID,
$preparedByEmployeeId: ID,
$preparedForCustomerContactId: ID,
) {
createQuote(
customerId: $customerId,
quoteNumber: “NEED TO CALCULATE WITH A MUTATION CALLBACK”,
employeeId: $preparedByEmployeeId,
customerContactId: $preparedForCustomerContactId
) {
id,
quoteNumber
}
}
i suppose i could create with quoteNumber: “TBD” or something, then mutation callback lambda could calculate, then front-end subscribes to updates on this quote and picks up the calculated value later.
nested mutation of some sort?