Add messenger connection removal
This commit is contained in:
@@ -1555,6 +1555,22 @@ export const resolvers = {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
deleteMyMessengerConnection: async (_, { connectionId }, context) => {
|
||||||
|
const user = requireUser(context);
|
||||||
|
const result = await context.prisma.messengerConnection.updateMany({
|
||||||
|
where: {
|
||||||
|
id: connectionId,
|
||||||
|
userId: user.id,
|
||||||
|
isActive: true,
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
isActive: false,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
return result.count > 0;
|
||||||
|
},
|
||||||
|
|
||||||
sendTestMessengerMessage: async (_, { type, channelId, message }, context) => {
|
sendTestMessengerMessage: async (_, { type, channelId, message }, context) => {
|
||||||
const user = requireUser(context);
|
const user = requireUser(context);
|
||||||
let targetChannelId = channelId;
|
let targetChannelId = channelId;
|
||||||
|
|||||||
@@ -523,6 +523,7 @@ type Mutation {
|
|||||||
createInvitation(input: CreateInvitationInput!): Invitation!
|
createInvitation(input: CreateInvitationInput!): Invitation!
|
||||||
acceptInvitation(input: AcceptInvitationInput!): User!
|
acceptInvitation(input: AcceptInvitationInput!): User!
|
||||||
connectMessenger(input: ConnectMessengerInput!): MessengerConnection!
|
connectMessenger(input: ConnectMessengerInput!): MessengerConnection!
|
||||||
|
deleteMyMessengerConnection(connectionId: ID!): Boolean!
|
||||||
upsertMyCounterpartyProfile(input: UpsertMyCounterpartyProfileInput!): CounterpartyProfile!
|
upsertMyCounterpartyProfile(input: UpsertMyCounterpartyProfileInput!): CounterpartyProfile!
|
||||||
addProductToCart(productId: ID!): Cart!
|
addProductToCart(productId: ID!): Cart!
|
||||||
updateCartItemQuantity(input: UpdateCartItemQuantityInput!): Cart!
|
updateCartItemQuantity(input: UpdateCartItemQuantityInput!): Cart!
|
||||||
|
|||||||
Reference in New Issue
Block a user