sdy

create GET_ROOM_BY_NAME query

......@@ -15,7 +15,7 @@ export const SUBSCRIPTION_MSG = gql`
`;
export const NEW_MESSAGE = gql`
mutation newMessage($message: String) {
mutation newMessage($message: String!) {
newMessage(message: $message) {
id
text
......@@ -27,3 +27,25 @@ export const NEW_MESSAGE = gql`
}
}
`;
export const WHOLE_MESSAGE = gql`
mutation wholeMessage($message: String!, $roomId: Int!) {
wholeMessage(message: $message, roomId: $roomId) {
id
text
sender {
id
username
}
createdAt
}
}
`;
export const GET_ROOM_BY_NAME = gql`
query getRoomByName($roomName: String!) {
getRoomByName(roomName: $roomName) {
id
}
}
`;
......