Compare commits

...

1 Commits

Author SHA1 Message Date
Dean Wenstrand
8441bb12e9 Select stream.id in upload-status operations so the cache stays normalized
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>
2026-07-22 19:27:25 -07:00
2 changed files with 7 additions and 0 deletions

View File

@@ -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
}
}

View File

@@ -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