20 lines
318 B
JavaScript
20 lines
318 B
JavaScript
import { gql } from 'graphql-tag'
|
|
|
|
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!
|
|
}
|
|
`
|