Merge pull request 'Add operation for set segment duration' (#19) from loewy/set-segment-duration-operation into master
Reviewed-on: #19 Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
This commit is contained in:
commit
80f609b8a2
@ -1686,6 +1686,17 @@ export type GetHlsInitUploadLinkMutation = {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type SetSegmentDurationMutationVariables = Exact<{
|
||||||
|
videoId: Scalars["Int"]["input"];
|
||||||
|
segmentId: Scalars["Int"]["input"];
|
||||||
|
duration: Scalars["Float"]["input"];
|
||||||
|
}>;
|
||||||
|
|
||||||
|
export type SetSegmentDurationMutation = {
|
||||||
|
__typename?: "Mutation";
|
||||||
|
setSegmentDuration: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
export type EditUploadStreamMutationVariables = Exact<{
|
export type EditUploadStreamMutationVariables = Exact<{
|
||||||
videoId: Scalars["Int"]["input"];
|
videoId: Scalars["Int"]["input"];
|
||||||
videoMetadataInput: VideoMetadataInput;
|
videoMetadataInput: VideoMetadataInput;
|
||||||
@ -3505,6 +3516,64 @@ export type GetHlsInitUploadLinkMutationOptions = Apollo.BaseMutationOptions<
|
|||||||
GetHlsInitUploadLinkMutation,
|
GetHlsInitUploadLinkMutation,
|
||||||
GetHlsInitUploadLinkMutationVariables
|
GetHlsInitUploadLinkMutationVariables
|
||||||
>;
|
>;
|
||||||
|
export const SetSegmentDurationDocument = gql`
|
||||||
|
mutation SetSegmentDuration(
|
||||||
|
$videoId: Int!
|
||||||
|
$segmentId: Int!
|
||||||
|
$duration: Float!
|
||||||
|
) {
|
||||||
|
setSegmentDuration(
|
||||||
|
videoId: $videoId
|
||||||
|
segmentId: $segmentId
|
||||||
|
duration: $duration
|
||||||
|
)
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
export type SetSegmentDurationMutationFn = Apollo.MutationFunction<
|
||||||
|
SetSegmentDurationMutation,
|
||||||
|
SetSegmentDurationMutationVariables
|
||||||
|
>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __useSetSegmentDurationMutation__
|
||||||
|
*
|
||||||
|
* To run a mutation, you first call `useSetSegmentDurationMutation` within a React component and pass it any options that fit your needs.
|
||||||
|
* When your component renders, `useSetSegmentDurationMutation` returns a tuple that includes:
|
||||||
|
* - A mutate function that you can call at any time to execute the mutation
|
||||||
|
* - An object with fields that represent the current status of the mutation's execution
|
||||||
|
*
|
||||||
|
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
|
||||||
|
*
|
||||||
|
* @example
|
||||||
|
* const [setSegmentDurationMutation, { data, loading, error }] = useSetSegmentDurationMutation({
|
||||||
|
* variables: {
|
||||||
|
* videoId: // value for 'videoId'
|
||||||
|
* segmentId: // value for 'segmentId'
|
||||||
|
* duration: // value for 'duration'
|
||||||
|
* },
|
||||||
|
* });
|
||||||
|
*/
|
||||||
|
export function useSetSegmentDurationMutation(
|
||||||
|
baseOptions?: Apollo.MutationHookOptions<
|
||||||
|
SetSegmentDurationMutation,
|
||||||
|
SetSegmentDurationMutationVariables
|
||||||
|
>,
|
||||||
|
) {
|
||||||
|
const options = { ...defaultOptions, ...baseOptions };
|
||||||
|
return Apollo.useMutation<
|
||||||
|
SetSegmentDurationMutation,
|
||||||
|
SetSegmentDurationMutationVariables
|
||||||
|
>(SetSegmentDurationDocument, options);
|
||||||
|
}
|
||||||
|
export type SetSegmentDurationMutationHookResult = ReturnType<
|
||||||
|
typeof useSetSegmentDurationMutation
|
||||||
|
>;
|
||||||
|
export type SetSegmentDurationMutationResult =
|
||||||
|
Apollo.MutationResult<SetSegmentDurationMutation>;
|
||||||
|
export type SetSegmentDurationMutationOptions = Apollo.BaseMutationOptions<
|
||||||
|
SetSegmentDurationMutation,
|
||||||
|
SetSegmentDurationMutationVariables
|
||||||
|
>;
|
||||||
export const EditUploadStreamDocument = gql`
|
export const EditUploadStreamDocument = gql`
|
||||||
mutation EditUploadStream(
|
mutation EditUploadStream(
|
||||||
$videoId: Int!
|
$videoId: Int!
|
||||||
|
@ -24,6 +24,18 @@ mutation GetHlsInitUploadLink($videoId: Int!) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mutation SetSegmentDuration(
|
||||||
|
$videoId: Int!
|
||||||
|
$segmentId: Int!
|
||||||
|
$duration: Float!
|
||||||
|
) {
|
||||||
|
setSegmentDuration(
|
||||||
|
videoId: $videoId
|
||||||
|
segmentId: $segmentId
|
||||||
|
duration: $duration
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
mutation EditUploadStream(
|
mutation EditUploadStream(
|
||||||
$videoId: Int!
|
$videoId: Int!
|
||||||
$videoMetadataInput: VideoMetadataInput!
|
$videoMetadataInput: VideoMetadataInput!
|
||||||
|
Loading…
Reference in New Issue
Block a user