Skip to content

Commit 80e1c6f

Browse files
committed
feat: add CreatePoint mutation
1 parent 5cb39fd commit 80e1c6f

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

docs/scope.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- `question`:題庫操作
1212
- `answer`:解答(只有 `read` 動作,`answer:write``question:write` 涵蓋)
1313
- `submission`:提交紀錄操作(做題)
14+
- `point`:點數操作(只有 `write` 操作)
1415

1516
## 動作
1617

graph/user.graphqls

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,9 @@ extend type Mutation {
105105
Logout from all the devices of the current user.
106106
"""
107107
logoutAll: Boolean! @scope(scope: "me:write")
108+
109+
"""
110+
Create a new point record for a user.
111+
"""
112+
createPoint(input: CreatePointInput!): Point @scope(scope: "point:write")
108113
}

graph/user.resolvers.go

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)