aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/graphql/model
diff options
context:
space:
mode:
Diffstat (limited to 'backend/graphql/model')
-rw-r--r--backend/graphql/model/generated.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/backend/graphql/model/generated.go b/backend/graphql/model/generated.go
index 11f9692..a305535 100644
--- a/backend/graphql/model/generated.go
+++ b/backend/graphql/model/generated.go
@@ -20,6 +20,14 @@ type Article struct {
Feed *Feed `json:"feed"`
}
+// A paginated list of articles
+type ArticleConnection struct {
+ // The list of articles
+ Articles []*Article `json:"articles"`
+ // Pagination information
+ PageInfo *PageInfo `json:"pageInfo"`
+}
+
// Authentication payload returned from login mutation
type AuthPayload struct {
// The authenticated user
@@ -38,6 +46,8 @@ type Feed struct {
FetchedAt string `json:"fetchedAt"`
// Whether the user is currently subscribed to this feed
IsSubscribed bool `json:"isSubscribed"`
+ // Number of unread articles in this feed
+ UnreadCount int32 `json:"unreadCount"`
// Articles belonging to this feed
Articles []*Article `json:"articles"`
}
@@ -46,6 +56,14 @@ type Feed struct {
type Mutation struct {
}
+// Pagination information for cursor-based pagination
+type PageInfo struct {
+ // Whether there are more items after the last item in this page
+ HasNextPage bool `json:"hasNextPage"`
+ // Cursor of the last item in this page
+ EndCursor *string `json:"endCursor,omitempty"`
+}
+
// Root query type for reading data
type Query struct {
}