stacker.news/api/typeDefs/message.js

20 lines
326 B
JavaScript
Raw Normal View History

2021-03-25 19:29:24 +00:00
import { gql } from 'apollo-server-micro'
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!
}
`