Morning folks, I’d like to send an sms message via...
# prisma-whats-new
t
Morning folks, I’d like to send an sms message via twilio but also save a record of the message. Should I do a write and use a subscription to send the sms? Or an operationAfter? Or some kind of resolver? ..hm, maybe operationBefore so I only write it if it succeeds?
Hey, anyone have a suggestion for which type of function I should use for this?
a
operationBefore is good if you only want to save the node if the sending succeeds. The other way around, and the saved message could act like a trigger for a subscription. That subscription could also update the status. The benefit of that approach is that subscriptions run async, so you get better performance in some cases.
t
thanks @agartha
do you know if there’s any concept of retries with subscriptions?
a
natively, no
t
okay thanks