shopify_draft_proxy/shopify/resource_ids

Mirrors src/shopify/resource-ids.ts.

Two ordering helpers that several domain serializers reach for:

Both return the conventional Lt/Eq/Gt instead of TS’s signed integer; callers pair with list.sort directly.

Values

pub fn compare_nullable_strings(
  left: option.Option(String),
  right: option.Option(String),
) -> order.Order

Compare two Option(String) values: None sorts after Some(_); two Some(_) values compare lexicographically.

pub fn compare_shopify_resource_ids(
  left: String,
  right: String,
) -> order.Order

Compare two Shopify GID strings. Tries to extract the trailing integer (gid://shopify/Foo/123123); when both sides parse, compares numerically. Falls back to lexicographic compare.

Search Document