delivery_method:local should be valid - the field is supported and “local” maps to the LOCAL enum. tim_1’s test with “shipping” working confirms the field name itself is fine, so the 400 is something else.
400 with no detail is the kicker - the response body almost always has an errors[] array with the real cause. Most clients only surface the HTTP status. Try logging the full response text:
const text = await res.text();
console.log(text);
Two angles to check:
API version - delivery_method in the orders search query was added in a specific release. Older versions return 400 if the field isn’t recognized. What’s your X-Shopify-API-Version header?
Cursor + query mismatch - I’ve hit 400 when the after cursor was generated under a different query string. Try first without after, just orders(first: 250, query: "delivery_method:local") - if that works, the cursor is the issue.
Also worth running the exact query in the Shopify GraphiQL App against the same store - strips out anything in your client layer.