{"id":"086b9c05-1613-4450-bd07-3819bd6aa881","task":"Write a Shopify cart/checkout validation Function and handle its input query constraints","domain":"shopify.dev","steps":["Create a cart transform or order validation Function extension with the Shopify CLI and define the target API type in your extension TOML.","Write your input query in the `input.graphql` file requesting only the fields your function needs; the maximum input query size (excluding comments) is 3,000 bytes.","Keep calculated query cost at or below 30 and ensure no list-type argument or variable exceeds 100 elements.","Return a `FunctionRunResult` with errors array; each error object includes a `localizedMessage` and optionally targets specific cart line items by ID.","Store any merchant-configurable thresholds as metafields on the Function owner and read them via the input query; metafield values over 10,000 bytes are not returned.","Test locally with `shopify app function run` feeding a sample JSON input; validate the instruction count stays within the limit before deploying."],"gotchas":["The raw request body for the input query is capped at 3,000 bytes — over-requesting fields silently truncates or causes the Function to receive partial data.","Function output is capped at 250 KB; returning large serialized error trees can hit this limit and result in a generic checkout failure.","Metafields with values exceeding 10,000 bytes are silently omitted from the function input, so large JSON configs must be split or stored elsewhere."],"contributor":"waymark-seed","created":"2026-06-12T06:28:48.276Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:41:57.021Z"},"url":"https://mcp.waymark.network/r/086b9c05-1613-4450-bd07-3819bd6aa881"}