Compare commits

...

3 Commits

Author SHA1 Message Date
a78f9e7b9d return shot gql with an annotation update
All checks were successful
Tests / Tests (pull_request) Successful in 16s
2024-10-23 16:39:16 -07:00
f98c98ecdd Merge pull request 'Add get usernames and following response' (#83) from kat/add-usernames-response into master
Reviewed-on: #83
2024-10-23 16:53:50 -06:00
3f6314aab7 Add get usernames and following response
All checks were successful
Tests / Tests (pull_request) Successful in 9s
2024-10-23 16:53:26 -06:00
3 changed files with 75 additions and 52 deletions

View File

@ -2169,6 +2169,7 @@ export type Query = {
getUserTags: Array<TagGql>;
getUserVideos: VideoHistoryGql;
getUsernames: Array<Scalars["String"]["output"]>;
getUsernamesAndFollowing: UsernamesAndFollowingResponse;
getVideo: VideoGql;
getVideoMakePercentageIntervals: Array<MakePercentageIntervalGql>;
getVideos: Array<VideoGql>;
@ -2238,6 +2239,13 @@ export type QueryGetUsernamesArgs = {
matchString?: InputMaybe<Scalars["String"]["input"]>;
};
export type QueryGetUsernamesAndFollowingArgs = {
after?: InputMaybe<Scalars["String"]["input"]>;
limit?: InputMaybe<Scalars["Int"]["input"]>;
matchString?: InputMaybe<Scalars["String"]["input"]>;
userId: Scalars["Int"]["input"];
};
export type QueryGetVideoArgs = {
debuggingJson?: InputMaybe<Scalars["JSON"]["input"]>;
videoId: Scalars["Int"]["input"];
@ -2404,15 +2412,6 @@ export type SuccessfulAddAddShotAnnotationErrors =
| AddShotAnnotationErrors
| SuccessfulAdd;
export type SuccessfulUpdate = {
__typename?: "SuccessfulUpdate";
value: Scalars["Boolean"]["output"];
};
export type SuccessfulUpdateUpdateShotAnnotationErrors =
| SuccessfulUpdate
| UpdateShotAnnotationErrors;
export type TagGql = {
__typename?: "TagGQL";
group?: Maybe<Scalars["String"]["output"]>;
@ -2455,14 +2454,10 @@ export type UpdateAnnotationInputGql = {
notes?: InputMaybe<Scalars["String"]["input"]>;
};
export type UpdateShotAnnotationErrors = {
__typename?: "UpdateShotAnnotationErrors";
error?: Maybe<DoesNotOwnShotErr>;
};
export type UpdateShotAnnotationReturn = {
__typename?: "UpdateShotAnnotationReturn";
value: SuccessfulUpdateUpdateShotAnnotationErrors;
error?: Maybe<DoesNotOwnShotErr>;
shot?: Maybe<ShotGql>;
};
export type UploadLink = {
@ -2528,6 +2523,13 @@ export type UserPlayTimeGql = {
totalSeconds: Scalars["Float"]["output"];
};
export type UsernamesAndFollowingResponse = {
__typename?: "UsernamesAndFollowingResponse";
followers: Array<Scalars["Int"]["output"]>;
following: Array<Scalars["Int"]["output"]>;
usernames: Array<Scalars["String"]["output"]>;
};
export type VideoFilterInput = {
isStreamCompleted?: InputMaybe<Scalars["Boolean"]["input"]>;
requireCursorCompletion?: Scalars["Boolean"]["input"];
@ -2768,16 +2770,26 @@ export type UpdateShotAnnotationsMutation = {
__typename?: "Mutation";
updateShotAnnotations: {
__typename?: "UpdateShotAnnotationReturn";
value:
| { __typename?: "SuccessfulUpdate"; value: boolean }
| {
__typename?: "UpdateShotAnnotationErrors";
error?: {
__typename?: "DoesNotOwnShotErr";
shotId: number;
msg?: string | null;
} | null;
shot?: {
__typename?: "ShotGQL";
id: number;
annotations: Array<{
__typename?: "ShotAnnotationGQL";
shotId: number;
notes: string;
errorDefault: boolean;
type: {
__typename?: "ShotAnnotationTypeGQL";
id: number;
name: string;
};
}>;
} | null;
error?: {
__typename?: "DoesNotOwnShotErr";
shotId: number;
msg?: string | null;
} | null;
};
};
@ -4340,17 +4352,22 @@ export const UpdateShotAnnotationsDocument = gql`
$annotations: [UpdateAnnotationInputGQL!]!
) {
updateShotAnnotations(shotId: $shotId, annotations: $annotations) {
value {
... on SuccessfulUpdate {
value
}
... on UpdateShotAnnotationErrors {
error {
shotId
msg
shot {
id
annotations {
shotId
type {
id
name
}
notes
errorDefault
}
}
error {
shotId
msg
}
}
}
`;

View File

@ -22,17 +22,22 @@ mutation UpdateShotAnnotations(
$annotations: [UpdateAnnotationInputGQL!]!
) {
updateShotAnnotations(shotId: $shotId, annotations: $annotations) {
value {
... on SuccessfulUpdate {
value
}
... on UpdateShotAnnotationErrors {
error {
shotId
msg
shot {
id
annotations {
shotId
type {
id
name
}
notes
errorDefault
}
}
error {
shotId
msg
}
}
}

View File

@ -35,6 +35,12 @@ type Query {
limit: Int = null
after: String = null
): [String!]!
getUsernamesAndFollowing(
userId: Int!
matchString: String = null
limit: Int = 100
after: String = null
): UsernamesAndFollowingResponse!
getPlayTime(userId: Int!): UserPlayTimeGQL!
getUserVideos(
userId: Int = null
@ -548,6 +554,12 @@ input CreatedAfter @oneOf {
createdAt: DateTime
}
type UsernamesAndFollowingResponse {
usernames: [String!]!
following: [Int!]!
followers: [Int!]!
}
type UserPlayTimeGQL {
totalSeconds: Float!
}
@ -650,18 +662,7 @@ type OtherErrorNeedsNote {
}
type UpdateShotAnnotationReturn {
value: SuccessfulUpdateUpdateShotAnnotationErrors!
}
union SuccessfulUpdateUpdateShotAnnotationErrors =
SuccessfulUpdate
| UpdateShotAnnotationErrors
type SuccessfulUpdate {
value: Boolean!
}
type UpdateShotAnnotationErrors {
shot: ShotGQL
error: DoesNotOwnShotErr
}