Add getPlayTime endpoint, remove elapsedTime

This commit is contained in:
Ivan Malison 2024-03-27 00:32:20 -06:00
parent 679150326f
commit 9307fbcbf4
3 changed files with 15 additions and 5 deletions

View File

@ -266,6 +266,7 @@ export type Query = {
getBucketSet?: Maybe<BucketSetGql>; getBucketSet?: Maybe<BucketSetGql>;
getDeployedConfig: DeployedConfigGql; getDeployedConfig: DeployedConfigGql;
getLoggedInUser?: Maybe<UserGql>; getLoggedInUser?: Maybe<UserGql>;
getPlayTime: UserPlayTimeGql;
getShots: Array<ShotGql>; getShots: Array<ShotGql>;
getUser?: Maybe<UserGql>; getUser?: Maybe<UserGql>;
getVideo: VideoGql; getVideo: VideoGql;
@ -281,6 +282,10 @@ export type QueryGetBucketSetArgs = {
keyName: Scalars["String"]["input"]; keyName: Scalars["String"]["input"];
}; };
export type QueryGetPlayTimeArgs = {
userId: Scalars["Int"]["input"];
};
export type QueryGetShotsArgs = { export type QueryGetShotsArgs = {
filterInput?: InputMaybe<FilterInput>; filterInput?: InputMaybe<FilterInput>;
}; };
@ -392,7 +397,6 @@ export type UploadStreamMetadataInput = {
export type UserGql = { export type UserGql = {
__typename?: "UserGQL"; __typename?: "UserGQL";
createdAt?: Maybe<Scalars["DateTime"]["output"]>; createdAt?: Maybe<Scalars["DateTime"]["output"]>;
elapsedTime: Scalars["Float"]["output"];
firebaseUid: Scalars["String"]["output"]; firebaseUid: Scalars["String"]["output"];
id: Scalars["Int"]["output"]; id: Scalars["Int"]["output"];
profileImageUri?: Maybe<Scalars["String"]["output"]>; profileImageUri?: Maybe<Scalars["String"]["output"]>;
@ -400,6 +404,11 @@ export type UserGql = {
username: Scalars["String"]["output"]; username: Scalars["String"]["output"];
}; };
export type UserPlayTimeGql = {
__typename?: "UserPlayTimeGQL";
totalSeconds: Scalars["Float"]["output"];
};
export type ValueFilterBool = { export type ValueFilterBool = {
equals?: InputMaybe<Scalars["Boolean"]["input"]>; equals?: InputMaybe<Scalars["Boolean"]["input"]>;
}; };
@ -652,7 +661,6 @@ export type GetLoggedInUserQuery = {
profileImageUri?: string | null; profileImageUri?: string | null;
createdAt?: any | null; createdAt?: any | null;
updatedAt?: any | null; updatedAt?: any | null;
elapsedTime: number;
} | null; } | null;
}; };
@ -1339,7 +1347,6 @@ export const GetLoggedInUserDocument = gql`
profileImageUri profileImageUri
createdAt createdAt
updatedAt updatedAt
elapsedTime
} }
} }
`; `;

View File

@ -27,6 +27,5 @@ query getLoggedInUser {
profileImageUri profileImageUri
createdAt createdAt
updatedAt updatedAt
elapsedTime
} }
} }

View File

@ -5,6 +5,7 @@ type Query {
getUser(userId: Int!): UserGQL getUser(userId: Int!): UserGQL
getLoggedInUser: UserGQL getLoggedInUser: UserGQL
getDeployedConfig: DeployedConfigGQL! getDeployedConfig: DeployedConfigGQL!
getPlayTime(userId: Int!): UserPlayTimeGQL!
getVideo(videoId: Int!): VideoGQL! getVideo(videoId: Int!): VideoGQL!
getShots(filterInput: FilterInput = null): [ShotGQL!]! getShots(filterInput: FilterInput = null): [ShotGQL!]!
getBucketSet(keyName: String!): BucketSetGQL getBucketSet(keyName: String!): BucketSetGQL
@ -127,7 +128,6 @@ type UserGQL {
profileImageUri: String profileImageUri: String
createdAt: DateTime createdAt: DateTime
updatedAt: DateTime updatedAt: DateTime
elapsedTime: Float!
} }
""" """
@ -139,6 +139,10 @@ type DeployedConfigGQL {
allowNewUsers: Boolean! allowNewUsers: Boolean!
} }
type UserPlayTimeGQL {
totalSeconds: Float!
}
type VideoGQL { type VideoGQL {
id: Int! id: Int!
owner: UserGQL owner: UserGQL