Hi all,
We’re building a high-traffic shoppable video app. Merchants import/upload videos, which we store as Shopify Files (Video media type). Once transcoding completes (fileStatus: READY), we cache the resulting CDN source URLs (sources[].url for SD/HD/HLS renditions) directly in our DB, keyed by the file/media GID.
We do this to avoid hitting the GraphQL Admin API on every storefront pageview, which wouldn’t scale under high traffic.
I’d love to confirm a few architectural points with the community and Shopify team:
- Do the CDN URLs under
sourcesfor a givenVideofile ever change after initial transcoding completes (e.g., due to background re-processing, CDN domain/key migrations, or url expiration) assuming the merchant doesn’t touch the file? - If they can change, is there a recommended way to detect it (a webhook, a
shopifyUpdatedAtcheck, etc.) rather than polling GraphQL for every file on a schedule? - Is caching these URLs long-term (keyed by GID) an intended/supported pattern, or does Shopify expect apps to always resolve fresh from the GID at render time?
Trying to make sure our architecture aligns with Shopify’s expectations. Thanks in advance!