Back

How to modify the payload in response of a Realtime subscription?

  • 0
  • Databases
  • Web
  • Realtime
Aashrith Raksh
9 Oct, 2024, 11:35

PROBLEM With Realtime, I subscribed to update events on some of the selected documents of a particular collection(Conversations)

When an update happens on the selected documents, I receive the response payload.

However, the payload contains only the updated document's "documentId". It doesn't include all the other attribute data of that document

WHAT I WANT I want to modify the payload data of the response. In this case, I want all the other attribute data in the payload.

How can I do this?

TL;DR
Problem: The user wants to modify the payload in response of a Realtime subscription to include all attribute data of an updated document, rather than just the documentId. Solution: Developers can customize the Realtime subscription response payload by including all the other attribute data of the document in the response. This can be achieved by adjusting the data structure and content of the response to meet the user's requirements.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more