feat: add id to User

This commit is contained in:
2024-11-17 09:44:09 -05:00
parent d6a27e1fa4
commit c7d8f3ffa4
3 changed files with 4 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ import type { User } from "~/types/user";
const GetUserQuery = graphql(` const GetUserQuery = graphql(`
query GetUser { query GetUser {
Viewer { Viewer {
id
name name
avatar { avatar {
medium medium

View File

@@ -9,6 +9,7 @@ const MarkEpisodeAsWatchedMutation = graphql(`
progress: $episodeNumber progress: $episodeNumber
) { ) {
user { user {
id
name name
avatar { avatar {
medium medium
@@ -31,6 +32,7 @@ const MarkTitleAsWatchedMutation = graphql(`
mutation MarkTitleAsWatched($titleId: Int!) { mutation MarkTitleAsWatched($titleId: Int!) {
SaveMediaListEntry(mediaId: $titleId, status: COMPLETED) { SaveMediaListEntry(mediaId: $titleId, status: COMPLETED) {
user { user {
id
name name
avatar { avatar {
medium medium

View File

@@ -11,6 +11,7 @@ export const User = z
.int() /* .openapi({ type: "integer", format: "int64" }) */, .int() /* .openapi({ type: "integer", format: "int64" }) */,
meanScore: z.number().openapi({ type: "number", format: "float" }), meanScore: z.number().openapi({ type: "number", format: "float" }),
}), }),
id: z.number().openapi({ type: "integer", format: "int64" }),
name: z.string(), name: z.string(),
avatar: z.object({ avatar: z.object({
medium: z.string(), medium: z.string(),