aboutsummaryrefslogtreecommitdiffhomepage
path: root/common/graphql/schema.graphql
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-11-02 00:00:35 +0900
committernsfisis <nsfisis@gmail.com>2025-11-02 00:00:35 +0900
commit104341ddc4add57f83c58cb3fabb23b6fbfdd3e4 (patch)
tree862b109fe257e6170a88929729dae3bddfb6eb49 /common/graphql/schema.graphql
parentba1e0c904f810193f25d4f88cc2bb168f1d625fe (diff)
downloadfeedaka-104341ddc4add57f83c58cb3fabb23b6fbfdd3e4.tar.gz
feedaka-104341ddc4add57f83c58cb3fabb23b6fbfdd3e4.tar.zst
feedaka-104341ddc4add57f83c58cb3fabb23b6fbfdd3e4.zip
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..55b10b7 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
+ """
+ me: 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!
}