Ionia-Devs / chameleon

https://chameleon-sandy.vercel.app
1 stars 1 forks source link

Set up Backend for Messages Frontend #65

Open Balance8 opened 5 months ago

Balance8 commented 5 months ago

Description:

We require the implementation of a backend feature to handle real-time user-to-user and group messaging functionalities using WunderGraph subscriptions. This will involve the following steps:

  1. Schema Design: Design a Prisma schema to model the data requirements for our messaging system. The schema should define the necessary entities, such as 'User', 'Message', 'Conversation', and any other required relationships (e.g., users to conversations).

  2. Subscription Setup: Utilize WunderGraph's out-of-the-box support for GraphQL subscriptions to push new message data to the clients in real-time. Leverage the demonstrated capabilities of WunderGraph as shown in the example provided to ensure no additional client-side subscription setup is required.

Image

https://docs.wundergraph.com/docs/features/realtime-subscriptions

  1. Real-Time Data: Ensure that the UI automatically updates with new messages as they become available without the need for extra setup such as WebSockets, utilizing HTTP/2 Streams or chunked encoding for communication.

  2. Testing and Documentation: After implementation, comprehensively test the subscription functionality to ensure messages are pushed and received in real-time. Document the setup process, including any Prisma schema migrations and the subscription configurations in WunderGraph.

Acceptance Criteria:

Tasks: