From b1550b31c52213bbd763f12c181ba5d2ec4a7cec Mon Sep 17 00:00:00 2001 From: Micah Weitzman Date: Mon, 22 Jul 2024 18:22:03 -0700 Subject: [PATCH 1/2] Added user tags --- src/index.tsx | 16 ++++++++++++++++ src/schema.gql | 10 ++++++++++ 2 files changed, 26 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index a3b66d9..76f3d88 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1114,6 +1114,7 @@ export type Query = { getShotAnnotationTypes: Array; getShots: Array; getUser?: Maybe; + getUserTags: UserTagsGql; getUserVideos: VideoHistoryGql; getUsernames: Array; getVideo: VideoGql; @@ -1141,6 +1142,10 @@ export type QueryGetUserArgs = { userId: Scalars["Int"]["input"]; }; +export type QueryGetUserTagsArgs = { + userId: Scalars["Int"]["input"]; +}; + export type QueryGetUserVideosArgs = { after?: InputMaybe; filters?: InputMaybe; @@ -1229,6 +1234,12 @@ export enum StreamSegmentTypeEnum { RbChunkedMp4 = "RB_CHUNKED_MP4", } +export type TagGql = { + __typename?: "TagGQL"; + id: Scalars["Int"]["output"]; + name: Scalars["String"]["output"]; +}; + export type TargetMetricsGql = { __typename?: "TargetMetricsGQL"; averageDifficulty?: Maybe; @@ -1293,6 +1304,11 @@ export type UserPlayTimeGql = { totalSeconds: Scalars["Float"]["output"]; }; +export type UserTagsGql = { + __typename?: "UserTagsGQL"; + tags: Array; +}; + export type VideoFilterInput = { isStreamCompleted?: InputMaybe; requireCursorCompletion?: Scalars["Boolean"]["input"]; diff --git a/src/schema.gql b/src/schema.gql index ef67913..c7d9a69 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -24,6 +24,7 @@ type Query { after: String = null filters: VideoFilterInput = null ): VideoHistoryGQL! + getUserTags(userId: Int!): UserTagsGQL! getVideo(videoId: Int!): VideoGQL! getVideos(videoIds: [Int!]!): [VideoGQL!]! } @@ -358,6 +359,15 @@ input VideoFilterInput { requireCursorCompletion: Boolean! = true } +type UserTagsGQL { + tags: [TagGQL!]! +} + +type TagGQL { + name: String! + id: Int! +} + type Mutation { createBucketSet(params: CreateBucketSetInput!): BucketSetGQL! setLoggerLevel(path: String!, level: String!): Boolean! -- 2.46.1 From e1237363f07137835174e784921eac4bf0277f27 Mon Sep 17 00:00:00 2001 From: Micah Weitzman Date: Tue, 23 Jul 2024 18:53:39 -0700 Subject: [PATCH 2/2] Removed wrapper type --- src/index.tsx | 8 ++------ src/schema.gql | 7 ++----- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 76f3d88..5c6c8b9 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1114,7 +1114,7 @@ export type Query = { getShotAnnotationTypes: Array; getShots: Array; getUser?: Maybe; - getUserTags: UserTagsGql; + getUserTags: Array; getUserVideos: VideoHistoryGql; getUsernames: Array; getVideo: VideoGql; @@ -1236,6 +1236,7 @@ export enum StreamSegmentTypeEnum { export type TagGql = { __typename?: "TagGQL"; + group?: Maybe; id: Scalars["Int"]["output"]; name: Scalars["String"]["output"]; }; @@ -1304,11 +1305,6 @@ export type UserPlayTimeGql = { totalSeconds: Scalars["Float"]["output"]; }; -export type UserTagsGql = { - __typename?: "UserTagsGQL"; - tags: Array; -}; - export type VideoFilterInput = { isStreamCompleted?: InputMaybe; requireCursorCompletion?: Scalars["Boolean"]["input"]; diff --git a/src/schema.gql b/src/schema.gql index c7d9a69..6c41273 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -24,7 +24,7 @@ type Query { after: String = null filters: VideoFilterInput = null ): VideoHistoryGQL! - getUserTags(userId: Int!): UserTagsGQL! + getUserTags(userId: Int!): [TagGQL!]! getVideo(videoId: Int!): VideoGQL! getVideos(videoIds: [Int!]!): [VideoGQL!]! } @@ -359,13 +359,10 @@ input VideoFilterInput { requireCursorCompletion: Boolean! = true } -type UserTagsGQL { - tags: [TagGQL!]! -} - type TagGQL { name: String! id: Int! + group: String } type Mutation { -- 2.46.1