Select stream.id in upload-status operations so the cache stays normalized
All checks were successful
Tests / Tests (pull_request) Successful in 11s
All checks were successful
Tests / Tests (pull_request) Successful in 11s
UploadStreamWithDetails and the editUploadStream response selected stream fields without id. Apollo cannot normalize an object with no id selected, so every upload-service poll rewrote VideoGQL.stream as an anonymous inline object — clobbering the id that feed/detail queries select. Their cache reads went partial and useQuery silently fell back to the last network result, rendered as the home feed collapsing to the first page (and bouncing the viewport) whenever an upload was polling. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -9031,6 +9031,7 @@ export type GetUploadLinkMutation = {
|
||||
};
|
||||
stream?: {
|
||||
__typename?: "UploadStreamGQL";
|
||||
id: string;
|
||||
uploadCompletionCursor: number;
|
||||
} | null;
|
||||
};
|
||||
@@ -9129,6 +9130,7 @@ export type UploadStreamWithDetailsFragment = {
|
||||
startTime?: any | null;
|
||||
stream?: {
|
||||
__typename?: "UploadStreamGQL";
|
||||
id: string;
|
||||
isCompleted: boolean;
|
||||
lastIntendedSegmentBound?: number | null;
|
||||
uploadCompletionCursor: number;
|
||||
@@ -9153,6 +9155,7 @@ export type GetUploadStreamsWithDetailsQuery = {
|
||||
startTime?: any | null;
|
||||
stream?: {
|
||||
__typename?: "UploadStreamGQL";
|
||||
id: string;
|
||||
isCompleted: boolean;
|
||||
lastIntendedSegmentBound?: number | null;
|
||||
uploadCompletionCursor: number;
|
||||
@@ -9692,6 +9695,7 @@ export const UploadStreamWithDetailsFragmentDoc = gql`
|
||||
name
|
||||
startTime
|
||||
stream {
|
||||
id
|
||||
isCompleted
|
||||
lastIntendedSegmentBound
|
||||
uploadCompletionCursor
|
||||
@@ -19475,6 +19479,7 @@ export const GetUploadLinkDocument = gql`
|
||||
}
|
||||
}
|
||||
stream {
|
||||
id
|
||||
uploadCompletionCursor
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ mutation GetUploadLink($videoId: Int!, $segmentIndex: Int!) {
|
||||
}
|
||||
}
|
||||
stream {
|
||||
id
|
||||
uploadCompletionCursor
|
||||
}
|
||||
}
|
||||
@@ -127,6 +128,7 @@ fragment UploadStreamWithDetails on VideoGQL {
|
||||
name
|
||||
startTime
|
||||
stream {
|
||||
id
|
||||
isCompleted
|
||||
lastIntendedSegmentBound
|
||||
uploadCompletionCursor
|
||||
|
||||
Reference in New Issue
Block a user