dean/get-video-card-query #250

Open
dean wants to merge 2 commits from dean/get-video-card-query into master
Member

What

Three new read operations to support the mobile session-detail redesign and
two payload optimizations. All reuse existing resolvers (getVideo,
getFeedVideos, getOrderedShots) — no backend/schema changes.

GetVideoCard($videoId)

Returns the full VideoCardFields fragment for a single video. Lets the
session-detail meta header share one source of truth (and the normalized
Apollo cache) with the feed card, instead of stitching together
GetVideoDetails + GetVideoSocialDetailsById.

GetLastSessionDate (lean)

Most-recent session startTime only, for the Home "you haven't recorded in
N days" nudge — which previously pulled the entire VideoCardFields payload
(reactions, comments, player summaries, tags, stream metadata) just to read
one timestamp.

GetShotClipRanges / ShotClipRange fragment (lean)

Per-shot frame/time window only (id, videoId, startFrame, endFrame,
startTime @client, endTime @client). The inline session player uses this
for condensed clip seeking instead of ShotWithAllFeatures — which dragged
cue/pocketing features, base64 serialized shot paths, and annotations for up
to 500 shots per session open. The @client time resolvers only need the
frame fields (they look the video up internally), so this is safe.

How it was generated

  • Edited only src/operations/*.gql (feed.gql, shots.gql, video.gql).
  • Regenerated via just gql; generated index.tsx is in sync (verified the
    canonical run reports no further diff).

Notes for reviewers

Mobile consumer: railbird-mobile#dean/brand-design-overhaul bumps its
submodule pointer to this branch. Merge this first, then the mobile PR's
pointer should be updated to the merged commit.

## What Three new read operations to support the mobile session-detail redesign and two payload optimizations. All reuse existing resolvers (`getVideo`, `getFeedVideos`, `getOrderedShots`) — **no backend/schema changes**. ### `GetVideoCard($videoId)` Returns the full `VideoCardFields` fragment for a single video. Lets the session-detail meta header share one source of truth (and the normalized Apollo cache) with the feed card, instead of stitching together `GetVideoDetails` + `GetVideoSocialDetailsById`. ### `GetLastSessionDate` (lean) Most-recent session `startTime` only, for the Home "you haven't recorded in N days" nudge — which previously pulled the entire `VideoCardFields` payload (reactions, comments, player summaries, tags, stream metadata) just to read one timestamp. ### `GetShotClipRanges` / `ShotClipRange` fragment (lean) Per-shot frame/time window only (`id`, `videoId`, `startFrame`, `endFrame`, `startTime @client`, `endTime @client`). The inline session player uses this for condensed clip seeking instead of `ShotWithAllFeatures` — which dragged cue/pocketing features, base64 serialized shot paths, and annotations for up to 500 shots per session open. The `@client` time resolvers only need the frame fields (they look the video up internally), so this is safe. ## How it was generated - Edited only `src/operations/*.gql` (`feed.gql`, `shots.gql`, `video.gql`). - Regenerated via `just gql`; generated `index.tsx` is in sync (verified the canonical run reports no further diff). ## Notes for reviewers Mobile consumer: `railbird-mobile#dean/brand-design-overhaul` bumps its submodule pointer to this branch. **Merge this first**, then the mobile PR's pointer should be updated to the merged commit.
dean added 2 commits 2026-06-05 21:35:54 +00:00
Returns the full VideoCardFields fragment for one video id, so the
session-detail meta header can share one source of truth (and the
normalized Apollo cache) with the feed card instead of stitching
together GetVideoDetails + GetVideoSocialDetailsById.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add lean GetLastSessionDate + GetShotClipRanges queries
All checks were successful
Tests / Tests (pull_request) Successful in 24s
6d5cd9b1ed
- GetLastSessionDate: most-recent session startTime only, for the Home
  recency nudge (was pulling the full VideoCardFields payload).
- GetShotClipRanges / ShotClipRange: per-shot frame/time window only, for
  the inline session player's condensed playback (was pulling
  ShotWithAllFeatures — features, serialized paths, annotations — x500).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
All checks were successful
Tests / Tests (pull_request) Successful in 24s
Required
Details
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin dean/get-video-card-query:dean/get-video-card-query
git checkout dean/get-video-card-query
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: railbird/railbird-gql#250
No description provided.