Skip to content

Chat Functionality Broken: API Breaking Changes in Chat Members Schema #2963

@may-tas

Description

@may-tas

Describe the bug

  • The chat functionality in the Talawa app is currently broken due to breaking changes introduced in the backend API. The ChatMembersConnectionEdge schema has been modified, causing the mobile app to fail when fetching and processing chat member data.

Root Cause

  • PR #3618 in talawa-api introduced breaking changes to the chat members schema:

Previous Schema:

edges: [ChatMembersConnectionEdge]
ChatMembersConnectionEdge {
  cursor: String!
  node: User  # Direct User object
}

New Schema:

edges: [ChatMembersConnectionEdge]
ChatMembersConnectionEdge {
  cursor: String!
  node: ChatMember  # Now returns ChatMember instead of User
}

ChatMember {
  role: ChatMembershipRole  # New field
  user: User                # User nested inside ChatMember
}

ChatMembershipRole {
  administrator
  regular
}

The following queries in chat_queries.dart are affected:

  • chatsByUser() - Returns members with incorrect structure
  • fetchChatMessagesByChatId() - Cannot properly parse chat members
  • fetchChatMembers() - Returns ChatMember objects instead of User objects

Expected behavior
The app should:

  • Successfully fetch chats with their members
  • Display chat member information correctly
  • Handle the new ChatMember structure with roles

Actual behavior

  • Chats fail to load or display properly
  • Member information is not parsed correctly
  • New personal or group chats are now able to be created due to incorrect model parsing.

Additional details

  • This is a backend breaking change that requires frontend updates
  • The change adds role-based functionality to chat members

Potential internship candidates

Please read this if you are planning to apply for a Palisadoes Foundation internship

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdartPull requests that update Dart codeno-issue-activityNo issue activity

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions