Hi, I have two questions about GROQ webhooks:
changedAny syntaxLooks like the
docs here are off when you do
delta::changedAny(<more than one field>)
more. I had to do two paretheses, e.g
delta::changedAny((name, phone))
, not to get invalid GROQ.
Trigger on both update and created with changedAny So, what’s the best practice (if it exists any best practices yet :)) when registrering webhooks. I’m trying to make a webhook for a specific type of documents fire on both creation
and on update only when specific fields has changed. I’m trying
_type == "customer" && delta::changedAny((field1, field2, ...))
. This hook won’t fire on creation because if the
delta::changedAny
I guess.
So do you recommend registering two separate webhooks in this case? Or is there a way to say
“fire on both creation, and on update iff these fields changed”?