Compare commits

...

8 Commits

Author SHA1 Message Date
ce8cfd6a68 Merge pull request 'TerminateUploadStream -- add fields' (#3) from loewy/terminate-upload-add-fields into master
Reviewed-on: #3
2024-02-15 21:38:15 -07:00
Loewy
234d4d0fa9 run codegen 2024-02-15 18:30:33 -08:00
Loewy
4d05d9a539 update operations 2024-02-15 18:14:54 -08:00
Loewy
3f16310f67 wip: add videoName, gameType & tableSize 2024-02-15 15:45:38 -08:00
204e289627 Actually regenerate code 2024-02-11 22:46:11 -07:00
fd731b2ecf Fix video uplaod 2024-02-11 22:44:18 -07:00
e733e413ef Small tweaks 2024-02-11 22:42:37 -07:00
90fc81776f Merge pull request 'Add shots and bucketed shot gql' (#2) from update-agg-gql into master
Reviewed-on: #2
2024-02-05 19:56:07 -07:00
4 changed files with 53 additions and 46 deletions

3
.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
node_modules
dist
.direnv

View File

@@ -129,7 +129,6 @@ export type Mutation = {
createBucketSet: BucketSetGql;
createUploadStream: CreateUploadStreamReturn;
getUploadLink: GetUploadLinkReturn;
processVideoSource: ProcessVideoSourceReturn;
terminateUploadStream: Scalars['Boolean']['output'];
};
@@ -146,18 +145,16 @@ export type MutationCreateUploadStreamArgs = {
export type MutationGetUploadLinkArgs = {
chunkIndex: Scalars['Int']['input'];
segmentIndex: Scalars['Int']['input'];
videoId: Scalars['Int']['input'];
};
export type MutationProcessVideoSourceArgs = {
input: ProcessVideoSourceInput;
};
export type MutationTerminateUploadStreamArgs = {
gameType?: InputMaybe<Scalars['String']['input']>;
tableSize?: InputMaybe<Scalars['String']['input']>;
videoId: Scalars['Int']['input'];
videoName?: InputMaybe<Scalars['String']['input']>;
};
export type OrFilter = {
@@ -176,19 +173,11 @@ export type PocketingIntentionFeaturesGql = {
targetPocketDistance?: Maybe<Scalars['Float']['output']>;
};
export type ProcessVideoSourceInput = {
val: Scalars['Int']['input'];
};
export type ProcessVideoSourceReturn = {
__typename?: 'ProcessVideoSourceReturn';
val: Scalars['Int']['output'];
};
export type Query = {
__typename?: 'Query';
getAggregateShots: Array<AggregateResultGql>;
getBucketSet?: Maybe<BucketSetGql>;
getLoggedInUser?: Maybe<UserGql>;
getShots: Array<ShotGql>;
getUser?: Maybe<UserGql>;
getVideo: VideoGql;
@@ -315,6 +304,7 @@ export type UploadStreamMetadata = {
export type UserGql = {
__typename?: 'UserGQL';
createdAt?: Maybe<Scalars['DateTime']['output']>;
firebaseUid: Scalars['String']['output'];
id: Scalars['Int']['output'];
statistics: UserStatisticsGql;
updatedAt?: Maybe<Scalars['DateTime']['output']>;
@@ -394,7 +384,7 @@ export type CreateUploadStreamMutation = { __typename?: 'Mutation', createUpload
export type GetUploadLinkMutationVariables = Exact<{
videoId: Scalars['Int']['input'];
chunkIndex: Scalars['Int']['input'];
segmentIndex: Scalars['Int']['input'];
}>;
@@ -402,6 +392,9 @@ export type GetUploadLinkMutation = { __typename?: 'Mutation', getUploadLink: {
export type TerminateUploadStreamMutationVariables = Exact<{
videoId: Scalars['Int']['input'];
videoName?: InputMaybe<Scalars['String']['input']>;
gameType?: InputMaybe<Scalars['String']['input']>;
tableSize?: InputMaybe<Scalars['String']['input']>;
}>;
@@ -569,8 +562,8 @@ export type CreateUploadStreamMutationHookResult = ReturnType<typeof useCreateUp
export type CreateUploadStreamMutationResult = Apollo.MutationResult<CreateUploadStreamMutation>;
export type CreateUploadStreamMutationOptions = Apollo.BaseMutationOptions<CreateUploadStreamMutation, CreateUploadStreamMutationVariables>;
export const GetUploadLinkDocument = gql`
mutation GetUploadLink($videoId: Int!, $chunkIndex: Int!) {
getUploadLink(videoId: $videoId, chunkIndex: $chunkIndex) {
mutation GetUploadLink($videoId: Int!, $segmentIndex: Int!) {
getUploadLink(videoId: $videoId, segmentIndex: $segmentIndex) {
uploadUrl
linksRequested
}
@@ -592,7 +585,7 @@ export type GetUploadLinkMutationFn = Apollo.MutationFunction<GetUploadLinkMutat
* const [getUploadLinkMutation, { data, loading, error }] = useGetUploadLinkMutation({
* variables: {
* videoId: // value for 'videoId'
* chunkIndex: // value for 'chunkIndex'
* segmentIndex: // value for 'segmentIndex'
* },
* });
*/
@@ -604,8 +597,13 @@ export type GetUploadLinkMutationHookResult = ReturnType<typeof useGetUploadLink
export type GetUploadLinkMutationResult = Apollo.MutationResult<GetUploadLinkMutation>;
export type GetUploadLinkMutationOptions = Apollo.BaseMutationOptions<GetUploadLinkMutation, GetUploadLinkMutationVariables>;
export const TerminateUploadStreamDocument = gql`
mutation TerminateUploadStream($videoId: Int!) {
terminateUploadStream(videoId: $videoId)
mutation TerminateUploadStream($videoId: Int!, $videoName: String, $gameType: String, $tableSize: String) {
terminateUploadStream(
videoId: $videoId
videoName: $videoName
gameType: $gameType
tableSize: $tableSize
)
}
`;
export type TerminateUploadStreamMutationFn = Apollo.MutationFunction<TerminateUploadStreamMutation, TerminateUploadStreamMutationVariables>;
@@ -624,6 +622,9 @@ export type TerminateUploadStreamMutationFn = Apollo.MutationFunction<TerminateU
* const [terminateUploadStreamMutation, { data, loading, error }] = useTerminateUploadStreamMutation({
* variables: {
* videoId: // value for 'videoId'
* videoName: // value for 'videoName'
* gameType: // value for 'gameType'
* tableSize: // value for 'tableSize'
* },
* });
*/

View File

@@ -1,13 +1,13 @@
mutation CreateUploadStream(
$videoName: String!,
$deviceType: DeviceTypeEnum,
$osVersion: String,
$appVersion: String,
$browserName: String,
$browserVersion: String,
$locale: String,
$timezone: String,
$networkType: String,
$videoName: String!
$deviceType: DeviceTypeEnum
$osVersion: String
$appVersion: String
$browserName: String
$browserVersion: String
$locale: String
$timezone: String
$networkType: String
$ipAddress: String
) {
createUploadStream(
@@ -28,13 +28,23 @@ mutation CreateUploadStream(
}
}
mutation GetUploadLink($videoId: Int!, $chunkIndex: Int!) {
getUploadLink(videoId: $videoId, chunkIndex: $chunkIndex) {
mutation GetUploadLink($videoId: Int!, $segmentIndex: Int!) {
getUploadLink(videoId: $videoId, segmentIndex: $segmentIndex) {
uploadUrl
linksRequested
}
}
mutation TerminateUploadStream($videoId: Int!) {
terminateUploadStream(videoId: $videoId)
mutation TerminateUploadStream(
$videoId: Int!
$videoName: String
$gameType: String
$tableSize: String
) {
terminateUploadStream(
videoId: $videoId
videoName: $videoName
gameType: $gameType
tableSize: $tableSize
)
}

View File

@@ -1,6 +1,7 @@
type Query {
getAggregateShots(bucketSets: [BucketSetInputGQL!]!): [AggregateResultGQL!]!
getUser(userId: Int!): UserGQL
getLoggedInUser: UserGQL
getVideo(videoId: Int!): VideoGQL!
getShots(filterInput: FilterInput = null): [ShotGQL!]!
getBucketSet(keyName: String!): BucketSetGQL
@@ -40,6 +41,7 @@ input BucketInputGQL {
type UserGQL {
id: Int!
firebaseUid: String!
username: String!
createdAt: DateTime
updatedAt: DateTime
@@ -224,10 +226,9 @@ type BucketSetGQL {
type Mutation {
createBucketSet(params: CreateBucketSetInput!): BucketSetGQL!
processVideoSource(input: ProcessVideoSourceInput!): ProcessVideoSourceReturn!
createUploadStream(uploadMetadata: UploadMetadataInput, videoName: String = null): CreateUploadStreamReturn!
getUploadLink(videoId: Int!, chunkIndex: Int!): GetUploadLinkReturn!
terminateUploadStream(videoId: Int!): Boolean!
getUploadLink(videoId: Int!, segmentIndex: Int!): GetUploadLinkReturn!
terminateUploadStream(videoId: Int!, videoName: String = null, gameType: String = null, tableSize: String = null): Boolean!
}
input CreateBucketSetInput {
@@ -236,14 +237,6 @@ input CreateBucketSetInput {
buckets: [BucketInputGQL!]!
}
type ProcessVideoSourceReturn {
val: Int!
}
input ProcessVideoSourceInput {
val: Int!
}
type CreateUploadStreamReturn {
videoId: Int!
}