Skip to content

Commit 5cb39fd

Browse files
committed
feat: add create mutation to Point model
1 parent 8737f3e commit 5cb39fd

File tree

4 files changed

+44
-1
lines changed

4 files changed

+44
-1
lines changed

ent/gql_mutation_input.go

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

ent/internal/schema.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ent/schema/point.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,8 @@ func (Point) Annotations() []schema.Annotation {
3939
ScopeDirective("user:read"),
4040
),
4141
entgql.RelayConnection(),
42+
entgql.Mutations(
43+
entgql.MutationCreate(),
44+
),
4245
}
4346
}

graph/ent.graphqls

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ input CreateGroupInput {
2727
scopeSetIDs: [ID!]
2828
}
2929
"""
30+
CreatePointInput is used for create Point object.
31+
Input was generated by ent.
32+
"""
33+
input CreatePointInput {
34+
points: Int
35+
grantedAt: Time
36+
description: String
37+
userID: ID!
38+
}
39+
"""
3040
CreateQuestionInput is used for create Question object.
3141
Input was generated by ent.
3242
"""

0 commit comments

Comments
 (0)