From 9307fbcbf4f391cbed2dbb7c27be91208361d4a6 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Wed, 27 Mar 2024 00:32:20 -0600 Subject: [PATCH] Add getPlayTime endpoint, remove elapsedTime --- src/index.tsx | 13 ++++++++++--- src/operations/user.gql | 1 - src/schema.gql | 6 +++++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 42f9132..f95d1fc 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -266,6 +266,7 @@ export type Query = { getBucketSet?: Maybe; getDeployedConfig: DeployedConfigGql; getLoggedInUser?: Maybe; + getPlayTime: UserPlayTimeGql; getShots: Array; getUser?: Maybe; getVideo: VideoGql; @@ -281,6 +282,10 @@ export type QueryGetBucketSetArgs = { keyName: Scalars["String"]["input"]; }; +export type QueryGetPlayTimeArgs = { + userId: Scalars["Int"]["input"]; +}; + export type QueryGetShotsArgs = { filterInput?: InputMaybe; }; @@ -392,7 +397,6 @@ export type UploadStreamMetadataInput = { export type UserGql = { __typename?: "UserGQL"; createdAt?: Maybe; - elapsedTime: Scalars["Float"]["output"]; firebaseUid: Scalars["String"]["output"]; id: Scalars["Int"]["output"]; profileImageUri?: Maybe; @@ -400,6 +404,11 @@ export type UserGql = { username: Scalars["String"]["output"]; }; +export type UserPlayTimeGql = { + __typename?: "UserPlayTimeGQL"; + totalSeconds: Scalars["Float"]["output"]; +}; + export type ValueFilterBool = { equals?: InputMaybe; }; @@ -652,7 +661,6 @@ export type GetLoggedInUserQuery = { profileImageUri?: string | null; createdAt?: any | null; updatedAt?: any | null; - elapsedTime: number; } | null; }; @@ -1339,7 +1347,6 @@ export const GetLoggedInUserDocument = gql` profileImageUri createdAt updatedAt - elapsedTime } } `; diff --git a/src/operations/user.gql b/src/operations/user.gql index de1d3b4..8703384 100644 --- a/src/operations/user.gql +++ b/src/operations/user.gql @@ -27,6 +27,5 @@ query getLoggedInUser { profileImageUri createdAt updatedAt - elapsedTime } } diff --git a/src/schema.gql b/src/schema.gql index fe953d8..a1bfe9e 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -5,6 +5,7 @@ type Query { getUser(userId: Int!): UserGQL getLoggedInUser: UserGQL getDeployedConfig: DeployedConfigGQL! + getPlayTime(userId: Int!): UserPlayTimeGQL! getVideo(videoId: Int!): VideoGQL! getShots(filterInput: FilterInput = null): [ShotGQL!]! getBucketSet(keyName: String!): BucketSetGQL @@ -127,7 +128,6 @@ type UserGQL { profileImageUri: String createdAt: DateTime updatedAt: DateTime - elapsedTime: Float! } """ @@ -139,6 +139,10 @@ type DeployedConfigGQL { allowNewUsers: Boolean! } +type UserPlayTimeGQL { + totalSeconds: Float! +} + type VideoGQL { id: Int! owner: UserGQL