Writing
A mutation runs the write and then triggers whatever the client declared for it:
const rename = client.watchMutation(api.modules.user.updateUser)
await rename.mutateAsync({ path: { id: '1' }, body: { name: 'Ada' } })
// "user.getUser" is invalidated automatically; any watching query refetches.Because the engine only calls endpoint(input) and reads its id, the same
watchMutation drives a typesocket acked event without changing anything:
const send = client.watchMutation(socket.modules.chat.sendMessage)