feat: Define User GraphQL types and user profile query

This commit is contained in:
2025-12-06 08:26:16 -05:00
parent a2702db794
commit fedc5e46da

View File

@@ -129,6 +129,19 @@ export const typeDefs = /* GraphQL */ `
url: String! url: String!
} }
type User {
name: String!
avatar: Image!
statistics: UserAnimeStatistics!
}
type UserAnimeStatistics {
count: Int!
meanScore: Float!
minutesWatched: Int!
episodesWatched: Int!
}
# ==================== # ====================
# Input Types # Input Types
# ==================== # ====================
@@ -181,6 +194,11 @@ export const typeDefs = /* GraphQL */ `
page: Int = 1 page: Int = 1
limit: Int = 10 limit: Int = 10
): PopularResult! ): PopularResult!
"""
Fetch the authenticated user's profile
"""
user: User!
} }
# ==================== # ====================