diff --git a/src/graphql/schema.ts b/src/graphql/schema.ts index 217c6a3..4d3dc3f 100644 --- a/src/graphql/schema.ts +++ b/src/graphql/schema.ts @@ -129,6 +129,19 @@ export const typeDefs = /* GraphQL */ ` url: String! } + type User { + name: String! + avatar: Image! + statistics: UserAnimeStatistics! + } + + type UserAnimeStatistics { + count: Int! + meanScore: Float! + minutesWatched: Int! + episodesWatched: Int! + } + # ==================== # Input Types # ==================== @@ -181,6 +194,11 @@ export const typeDefs = /* GraphQL */ ` page: Int = 1 limit: Int = 10 ): PopularResult! + + """ + Fetch the authenticated user's profile + """ + user: User! } # ====================