mirror of
https://github.com/sergeyyarkov/todo-app.git
synced 2026-10-11 18:39:09 +03:00
19 lines
533 B
JavaScript
19 lines
533 B
JavaScript
const { gql } = require('apollo-server')
|
|
|
|
const mutation = gql`
|
|
type Mutation {
|
|
# Todo mutations
|
|
createTodo(title: String! description: String! deadline: String! categoryId: String!): Todo
|
|
deleteTodo(id: ID!): Todo
|
|
updateTodo(id: ID! title: String! description: String! deadline: String! categoryId: String!): Todo
|
|
|
|
# Category mutations
|
|
createCategory(title: String!): Category
|
|
deleteCategory(id: ID!): Category
|
|
updateCategory(id: ID! title: String!): Category
|
|
}
|
|
`
|
|
|
|
module.exports = {
|
|
mutation
|
|
} |