Skip to content

Commit 1ca5991

Browse files
committed
chore: regenerate schema
1 parent ae543a7 commit 1ca5991

File tree

6 files changed

+131
-17
lines changed

6 files changed

+131
-17
lines changed

ent/gql_collection.go

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

ent/gql_edge.go

Lines changed: 17 additions & 8 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/question.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ func (Question) Edges() []ent.Edge {
4040
Ref("questions").
4141
Unique().
4242
Required(),
43-
edge.To("submissions", Submission.Type),
43+
edge.To("submissions", Submission.Type).
44+
Annotations(
45+
entgql.RelayConnection(),
46+
entgql.Directives(ScopeDirective("submission:read")),
47+
),
4448
}
4549
}
4650

graph/ent.graphqls

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,37 @@ type Question implements Node {
777777
"""
778778
referenceAnswer: String! @scope(scope: "answer:read")
779779
database: Database!
780-
submissions: [Submission!]
780+
submissions(
781+
"""
782+
Returns the elements in the list that come after the specified cursor.
783+
"""
784+
after: Cursor
785+
786+
"""
787+
Returns the first _n_ elements from the list.
788+
"""
789+
first: Int
790+
791+
"""
792+
Returns the elements in the list that come before the specified cursor.
793+
"""
794+
before: Cursor
795+
796+
"""
797+
Returns the last _n_ elements from the list.
798+
"""
799+
last: Int
800+
801+
"""
802+
Ordering options for Submissions returned from the connection.
803+
"""
804+
orderBy: SubmissionOrder
805+
806+
"""
807+
Filtering options for Submissions returned from the connection.
808+
"""
809+
where: SubmissionWhereInput
810+
): SubmissionConnection! @scope(scope: "submission:read")
781811
}
782812
"""
783813
A connection to a list of items.

graph/model/models_gen.go

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

0 commit comments

Comments
 (0)