The URL is the configurator
Options resolve to a Shopify variant on the server. The same function runs on the client for instant feedback — so a shared link renders the exact watch, priced, with zero layout shift.
// Server + client share one resolver — no drift between them.
export async function loader({ params, request, context }: LoaderArgs) {
const url = new URL(request.url);
const config = parseConfig(url.searchParams); // { metal, dial, strap }
const { product } = await context.storefront.query(WATCH_QUERY, {
variables: { handle: params.handle, country: context.market.country },
cache: context.storefront.CacheLong(),
});
const variant = resolveVariant(product.variants.nodes, config);
if (!variant) throw redirect(canonicalUrl(product, DEFAULT_CONFIG));
return defer({ product, variant, config });
}