Compare commits

..

5 Commits

Author SHA1 Message Date
2745521664 add operations to retire tag
All checks were successful
Tests / Tests (pull_request) Successful in 9s
2025-03-21 14:38:37 -07:00
8efa2e067c Merge pull request 'Add functionality to retire tags' (#167) from mk/retire-tags-gql into master
Reviewed-on: #167
2025-03-21 14:39:27 -06:00
919fe5ba24 Merge branch 'master' into mk/retire-tags-gql
All checks were successful
Tests / Tests (pull_request) Successful in 16s
2025-03-19 15:08:46 -06:00
7ff60dc9c5 Merge pull request 'Revert "Merge pull request 'Add functionality for retiring tags' (#165) from mk/retire-tags-gql into master"' (#166) from mk/revert-retire-tags into master
Reviewed-on: #166
2025-03-19 15:08:16 -06:00
7e0d8a84ee Add functionality to retire tags
All checks were successful
Tests / Tests (pull_request) Successful in 6s
2025-03-19 14:07:15 -07:00
3 changed files with 73 additions and 1 deletions

View File

@@ -2153,6 +2153,7 @@ export type Mutation = {
getHlsInitUploadLink: GetUploadLinkReturn;
getProfileImageUploadLink: GetProfileUploadLinkReturn;
getUploadLink: GetUploadLinkReturn;
retireTags: Scalars["Boolean"]["output"];
setLoggerLevel: Scalars["Boolean"]["output"];
setSegmentDuration: Scalars["Boolean"]["output"];
unfollowUser: UserGql;
@@ -2217,6 +2218,10 @@ export type MutationGetUploadLinkArgs = {
videoId: Scalars["Int"]["input"];
};
export type MutationRetireTagsArgs = {
tagIds: Array<Scalars["Int"]["input"]>;
};
export type MutationSetLoggerLevelArgs = {
level: Scalars["String"]["input"];
path: Scalars["String"]["input"];
@@ -2434,6 +2439,10 @@ export type QueryGetUserRelationshipsMatchingArgs = {
userId: Scalars["Int"]["input"];
};
export type QueryGetUserTagsArgs = {
includeRetiredTags?: InputMaybe<Scalars["Boolean"]["input"]>;
};
export type QueryGetUserVideosArgs = {
after?: InputMaybe<Scalars["String"]["input"]>;
filters?: InputMaybe<VideoFilterInput>;
@@ -2726,6 +2735,7 @@ export type TagGql = {
__typename?: "TagGQL";
id: Scalars["Int"]["output"];
name: Scalars["String"]["output"];
retired: Scalars["Boolean"]["output"];
tagClasses?: Maybe<Array<TagClassGql>>;
};
@@ -3845,6 +3855,15 @@ export type EditShotMutation = {
};
};
export type RetireTagsMutationVariables = Exact<{
tagIds: Array<Scalars["Int"]["input"]> | Scalars["Int"]["input"];
}>;
export type RetireTagsMutation = {
__typename?: "Mutation";
retireTags: boolean;
};
export type GetProfileImageUploadLinkMutationVariables = Exact<{
fileExt?: InputMaybe<Scalars["String"]["input"]>;
}>;
@@ -6595,6 +6614,54 @@ export type EditShotMutationOptions = Apollo.BaseMutationOptions<
EditShotMutation,
EditShotMutationVariables
>;
export const RetireTagsDocument = gql`
mutation RetireTags($tagIds: [Int!]!) {
retireTags(tagIds: $tagIds)
}
`;
export type RetireTagsMutationFn = Apollo.MutationFunction<
RetireTagsMutation,
RetireTagsMutationVariables
>;
/**
* __useRetireTagsMutation__
*
* To run a mutation, you first call `useRetireTagsMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useRetireTagsMutation` 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 [retireTagsMutation, { data, loading, error }] = useRetireTagsMutation({
* variables: {
* tagIds: // value for 'tagIds'
* },
* });
*/
export function useRetireTagsMutation(
baseOptions?: Apollo.MutationHookOptions<
RetireTagsMutation,
RetireTagsMutationVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useMutation<RetireTagsMutation, RetireTagsMutationVariables>(
RetireTagsDocument,
options,
);
}
export type RetireTagsMutationHookResult = ReturnType<
typeof useRetireTagsMutation
>;
export type RetireTagsMutationResult =
Apollo.MutationResult<RetireTagsMutation>;
export type RetireTagsMutationOptions = Apollo.BaseMutationOptions<
RetireTagsMutation,
RetireTagsMutationVariables
>;
export const GetProfileImageUploadLinkDocument = gql`
mutation getProfileImageUploadLink($fileExt: String = ".png") {
getProfileImageUploadLink(fileExt: $fileExt) {

3
src/operations/tags.gql Normal file
View File

@@ -0,0 +1,3 @@
mutation RetireTags($tagIds: [Int!]!) {
retireTags(tagIds: $tagIds)
}

View File

@@ -60,7 +60,7 @@ type Query {
after: String = null
filters: VideoFilterInput = null
): VideoHistoryGQL!
getUserTags: [TagGQL!]!
getUserTags(includeRetiredTags: Boolean = false): [TagGQL!]!
getVideo(videoId: Int!, debuggingJson: JSON = null): VideoGQL!
getVideos(videoIds: [Int!]!): [VideoGQL!]!
getFeedVideos(
@@ -718,6 +718,7 @@ type TagGQL {
id: Int!
name: String!
tagClasses: [TagClassGQL!]
retired: Boolean!
}
type TagClassGQL {
@@ -784,6 +785,7 @@ type Mutation {
editUser(input: EditUserInputGQL!): UserGQL!
followUser(followedUserId: Int!): UserGQL!
unfollowUser(followedUserId: Int!): UserGQL!
retireTags(tagIds: [Int!]!): Boolean!
findPrerecordTableLayout(b64Image: String!, videoId: Int!): HomographyInfoGQL
createUploadStream(
videoMetadata: VideoMetadataInput!