fix(offers): add read_draft_orders scope so draftOrders query works

This commit is contained in:
Gerhard Scheikl
2026-05-09 19:41:12 +02:00
parent 6224597497
commit 6ded8ec1b9
4 changed files with 51 additions and 2 deletions
+7
View File
@@ -146,7 +146,14 @@ export const loader = async ({ request }: LoaderFunctionArgs) => {
}>;
};
};
errors?: Array<{ message: string }>;
};
if (json.errors?.length) {
console.warn(
"draftOrders query returned errors:",
json.errors.map((e) => e.message).join("; "),
);
}
const nodes = json.data?.draftOrders?.nodes ?? [];
const draftIds = nodes.map((n) => n.id);