aboutsummaryrefslogtreecommitdiffhomepage
path: root/common/graphql/schema.graphql
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-11-06 04:10:55 +0900
committernsfisis <nsfisis@gmail.com>2025-11-08 05:04:02 +0900
commite0cc2915f22fe74d5be9e8f51d6b73437192e0ba (patch)
treee2e27e3cba8b5e7205732eef7b6df9789e83396f /common/graphql/schema.graphql
parentba1e0c904f810193f25d4f88cc2bb168f1d625fe (diff)
downloadfeedaka-e0cc2915f22fe74d5be9e8f51d6b73437192e0ba.tar.gz
feedaka-e0cc2915f22fe74d5be9e8f51d6b73437192e0ba.tar.zst
feedaka-e0cc2915f22fe74d5be9e8f51d6b73437192e0ba.zip
feat: Support multi-user
Diffstat (limited to 'common/graphql/schema.graphql')
-rw-r--r--common/graphql/schema.graphql40
1 files changed, 40 insertions, 0 deletions
diff --git a/common/graphql/schema.graphql b/common/graphql/schema.graphql
index a0bfa7e..e37d729 100644
--- a/common/graphql/schema.graphql
+++ b/common/graphql/schema.graphql
@@ -76,6 +76,31 @@ type Article {
}
"""
+Represents a user in the system
+"""
+type User {
+ """
+ Unique identifier for the user
+ """
+ id: ID!
+
+ """
+ Username of the user
+ """
+ username: String!
+}
+
+"""
+Authentication payload returned from login mutation
+"""
+type AuthPayload {
+ """
+ The authenticated user
+ """
+ user: User!
+}
+
+"""
Root query type for reading data
"""
type Query {
@@ -103,6 +128,11 @@ type Query {
Get a specific article by ID
"""
article(id: ID!): Article
+
+ """
+ Get the currently authenticated user
+ """
+ currentUser: User
}
"""
@@ -138,4 +168,14 @@ type Mutation {
Mark all articles in a feed as unread
"""
markFeedUnread(id: ID!): Feed!
+
+ """
+ Login with username and password. Creates a session cookie.
+ """
+ login(username: String!, password: String!): AuthPayload!
+
+ """
+ Logout the current user and destroy the session
+ """
+ logout: Boolean!
}