From 104341ddc4add57f83c58cb3fabb23b6fbfdd3e4 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 2 Nov 2025 00:00:35 +0900 Subject: wip --- common/graphql/schema.graphql | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'common/graphql/schema.graphql') 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 @@ -75,6 +75,31 @@ type Article { feed: Feed! } +""" +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 """ @@ -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! } -- cgit v1.2.3-70-g09d2