mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
33 lines
481 B
TypeScript
33 lines
481 B
TypeScript
import gql from 'graphql-tag'
|
|
|
|
export const createMessageMutation = () => {
|
|
return gql`
|
|
mutation (
|
|
$roomId: ID!
|
|
$content: String!
|
|
) {
|
|
CreateMessage(
|
|
roomId: $roomId
|
|
content: $content
|
|
) {
|
|
id
|
|
content
|
|
}
|
|
}
|
|
`
|
|
}
|
|
|
|
export const messageQuery = () => {
|
|
return gql`
|
|
query($roomId: ID!) {
|
|
Message(roomId: $roomId) {
|
|
id
|
|
content
|
|
author {
|
|
id
|
|
}
|
|
}
|
|
}
|
|
`
|
|
}
|