Skip to content

Commit 56f7bab

Browse files
committed
Mutations
1 parent 7bff29a commit 56f7bab

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

graphql/category.graphql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
extend type Query {
22
categories: [Category!]! @paginate
33
category(id: ID! @eq): Category @find
4+
}
5+
6+
extend type Mutation {
7+
createCategory(name: String!, description: String!): Category! @create
8+
deleteCategory(id: ID! @eq): Category @guard @delete
49
}

graphql/comment.graphql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
extend type Mutation {
22
createComment(content: String!): Comment! @guard
33
updateComment(id: ID! @eq, content: String!): Comment @guard @update
4+
deleteComment(id: ID! @eq): Comment @guard @delete
45
}

graphql/tag.graphql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
extend type Query {
22
tags: [Tag!]! @paginate
33
tag(id: ID! @eq): Tag @find
4+
}
5+
6+
extend type Mutation {
7+
createTag(name: String! @eq, description: String!): Tag! @guard @create
8+
updateTag(id: ID! @eq, name: String, description: String): Tag @guard @update
9+
deleteTag(id: ID! @eq): Tag @guard @delete
410
}

0 commit comments

Comments
 (0)