Skip to content

Commit

Permalink
fix: confilts
Browse files Browse the repository at this point in the history
  • Loading branch information
disha1202 committed Oct 21, 2024
1 parent 1b83672 commit 7ff5f05
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 404 deletions.
125 changes: 0 additions & 125 deletions src/GraphQl/Mutations/OrganizationMutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,93 +110,11 @@ export const SEND_MESSAGE_TO_CHAT = gql`
$chatId: ID!
$replyTo: ID
$messageContent: String!
$type: String!
) {
sendMessageToChat(
chatId: $chatId
replyTo: $replyTo
messageContent: $messageContent
type: $type
) {
_id
createdAt
messageContent
replyTo {
_id
createdAt
messageContent
sender {
_id
firstName
lastName
}
updatedAt
}
sender {
_id
firstName
lastName
}
updatedAt
}
}
`;

export const SEND_MESSAGE_TO_DIRECT_CHAT = gql`
mutation sendMessageToDirectChat(
$chatId: ID!
$replyTo: ID
$messageContent: String!
) {
sendMessageToDirectChat(
chatId: $chatId
replyTo: $replyTo
messageContent: $messageContent
) {
_id
createdAt
messageContent
replyTo {
_id
createdAt
messageContent
receiver {
_id
firstName
lastName
}
sender {
_id
firstName
lastName
}
updatedAt
}
receiver {
_id
firstName
lastName
}
sender {
_id
firstName
lastName
}
updatedAt
}
}
`;

export const SEND_MESSAGE_TO_GROUP_CHAT = gql`
mutation sendMessageToGroupChat(
$chatId: ID!
$replyTo: ID
$messageContent: String!
) {
sendMessageToGroupChat(
chatId: $chatId
replyTo: $replyTo
messageContent: $messageContent
) {
_id
createdAt
Expand Down Expand Up @@ -240,30 +158,6 @@ export const CREATE_MESSAGE_CHAT = gql`
}
`;

export const MESSAGE_SENT_TO_DIRECT_CHAT = gql`
subscription messageSentToDirectChat($userId: ID!) {
messageSentToDirectChat(userId: $userId) {
_id
createdAt
directChatMessageBelongsTo {
_id
}
messageContent
receiver {
_id
firstName
lastName
}
sender {
_id
firstName
lastName
}
updatedAt
}
}
`;

export const MESSAGE_SENT_TO_CHAT = gql`
subscription messageSentToChat($userId: ID!) {
messageSentToChat(userId: $userId) {
Expand All @@ -284,7 +178,6 @@ export const MESSAGE_SENT_TO_CHAT = gql`
}
updatedAt
}
type
sender {
_id
firstName
Expand All @@ -295,24 +188,6 @@ export const MESSAGE_SENT_TO_CHAT = gql`
}
`;

export const MESSAGE_SENT_TO_GROUP_CHAT = gql`
subscription messageSentToGroupChat($userId: ID!) {
messageSentToGroupChat(userId: $userId) {
_id
createdAt
groupChatMessageBelongsTo {
_id
}
messageContent
sender {
_id
firstName
lastName
}
updatedAt
}
}
`;
//Plugin WebSocket listner

/**
Expand Down
198 changes: 0 additions & 198 deletions src/GraphQl/Queries/PlugInQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,83 +108,6 @@ export const ORGANIZATION_EVENTS_CONNECTION = gql`

// directChatsMessagesByChatID(id: ID!): [DirectChatMessage]

export const DIRECT_CHAT_MESSAGES_BY_CHAT_ID = gql`
query directChatsMessagesByChatID($id: ID!) {
directChatsMessagesByChatID(id: $id) {
_id
createdAt
messageContent
receiver {
_id
firstName
lastName
email
image
}
sender {
_id
firstName
lastName
email
image
}
}
}
`;

export const DIRECT_CHAT_BY_ID = gql`
query directChatById($id: ID!) {
directChatById(id: $id) {
_id
createdAt
messages {
_id
createdAt
messageContent
replyTo {
_id
createdAt
messageContent
receiver {
_id
firstName
lastName
email
image
}
sender {
_id
firstName
lastName
email
image
}
}
receiver {
_id
firstName
lastName
email
image
}
sender {
_id
firstName
lastName
email
image
}
}
users {
_id
firstName
lastName
email
}
}
}
`;

export const CHAT_BY_ID = gql`
query chatById($id: ID!) {
chatById(id: $id) {
Expand All @@ -195,47 +118,6 @@ export const CHAT_BY_ID = gql`
_id
}
createdAt
messages {
_id
createdAt
messageContent
replyTo {
_id
createdAt
messageContent
type
sender {
_id
firstName
lastName
email
image
}
}
sender {
_id
firstName
lastName
email
image
}
}
users {
_id
firstName
lastName
email
}
}
}
`;

export const GROUP_CHAT_BY_ID = gql`
query groupChatById($id: ID!) {
groupChatById(id: $id) {
_id
createdAt
title
messages {
_id
createdAt
Expand Down Expand Up @@ -265,7 +147,6 @@ export const GROUP_CHAT_BY_ID = gql`
firstName
lastName
email
image
}
}
}
Expand All @@ -278,43 +159,6 @@ export const CHATS_LIST = gql`
isGroup
name
creator {
_id
firstName
lastName
email
}
messages {
_id
type
createdAt
messageContent
sender {
_id
firstName
lastName
email
}
}
organization {
_id
name
}
users {
_id
firstName
lastName
email
image
}
}
}
`;

export const DIRECT_CHATS_LIST = gql`
query DirectChatsByUserID($id: ID!) {
directChatsByUserID(id: $id) {
_id
creator {
_id
firstName
Expand All @@ -325,12 +169,6 @@ export const DIRECT_CHATS_LIST = gql`
_id
createdAt
messageContent
receiver {
_id
firstName
lastName
email
}
sender {
_id
firstName
Expand All @@ -353,42 +191,6 @@ export const DIRECT_CHATS_LIST = gql`
}
`;

export const GROUP_CHAT_LIST = gql`
query GroupChatsByUserID($id: ID!) {
groupChatsByUserId(id: $id) {
_id
creator {
_id
firstName
lastName
email
}
title
messages {
_id
createdAt
messageContent
sender {
_id
firstName
lastName
email
}
}
organization {
_id
name
}
users {
_id
firstName
lastName
email
image
}
}
}
`;
/**
* GraphQL query to check if an organization is a sample organization.
*
Expand Down
Loading

0 comments on commit 7ff5f05

Please sign in to comment.