A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hey guys,
I'm trying to follow this documentation: https://shopify.dev/api/examples/order-editing#how-it-works
But with every one of the queries on the doc I get a 'Method not allowed' response, though it's being done through a POST request. I've already queried other GraphQl endpoints so I know I'm requesting correctly. Maybe my query body is wrongly structured?
For example the 'Begin Order Edit' request:
import { postGraphQl } from "../graphQl/postGraphQl";
export const postOrderBeginEdit = async (shop, accessToken, orderId) => {
const body = `
mutation {
orderEditBegin(
id: "gid://shopify/Order/${orderId}"
) {
userErrors {
field
message
}
calculatedOrder{
id
}
}
}`;
return postGraphQl(shop, accessToken, body);
};
I have also tried adding the 'write_order_edits' permission as mentioned in the docs but still no changes.