2023-07-23 15:08:43 +00:00
|
|
|
import { gql } from 'graphql-tag'
|
2021-03-25 19:29:24 +00:00
|
|
|
|
|
|
|
export default gql`
|
|
|
|
extend type Query {
|
|
|
|
messages: [Message!]!
|
|
|
|
message(id: ID!): Message!
|
|
|
|
}
|
|
|
|
|
|
|
|
extend type Mutation {
|
|
|
|
createMessage(text: String!): Message!
|
|
|
|
deleteMessage(id: ID!): Boolean!
|
|
|
|
}
|
|
|
|
|
|
|
|
type Message {
|
|
|
|
id: ID!
|
|
|
|
text: String!
|
|
|
|
user: User!
|
|
|
|
}
|
|
|
|
`
|