I received this message when using GraphQL. Could you help please?
{ "errors": [ { "message": "Internal error. Looks like something went wrong on our end.\nRequest ID: 25ea121b-2774-4772-9e01-f104fa28dbec (include this in support requests).", "extensions": { "code": "INTERNAL_SERVER_ERROR", "requestId": "25ea121b-2774-4772-9e01-f104fa28dbec" } } ] }
This is my code, the order Id was taken from the query above
query main { orders(first: 5) { edges{ node { id closed } } pageInfo { hasNextPage } } } mutation delorder { second: metafieldDelete(input: { id: "gid://shopify/Order/2094635679805" }) { userErrors {field message } deletedId } }
Please notice that with the id encoded in base64, the error is the same
Solved! Go to the solution
Hey @jirnmy
The id should be the ID of the metafield to delete. Have you tried:
mutation metafieldDelete($input: MetafieldDeleteInput!) { metafieldDelete(input: $input) { deletedId userErrors { field message } } }
{
"input": { "id": "Z2lkOi8vU2hvcGlmeS9FeGFtcGxlLzE=" }
}
Hi @SBD_
Could you take a look at my query please? I first get the IDs from the `main` query. And then use the IDs from that to delete the Meta in `delorder`.
Could you help point out where I'm wrong?
Thanks!
Hey @jirnmy
You'll need the metafield ID, not the order ID. Try something like this:
{ orders(first:1) { edges { node { id metafields (first:1) { edges { node { id } } } } } } } mutation metafieldDelete($input: MetafieldDeleteInput!) { metafieldDelete(input: $input) { deletedId userErrors { field message } } } { "input": { "id": "gid://shopify/Metafield/1234" } }
@SBD_ Thanks! I understand now.
However, the metafield query doesn't give me any Ids? What could be the problem?
The order I'm checking has the status of Cancelled. It's displaying the delete button when viewing order's detail.
Here is the response, please help, thanks!
{ "data": { "orders": { "edges": [ { "node": { "id": "gid://shopify/Order/2119891517501", "metafields": { "edges": [] } } } ] } }, "extensions": { "cost": { "requestedQueryCost": 6, "actualQueryCost": 5, "throttleStatus": { "maximumAvailable": 1000, "currentlyAvailable": 995, "restoreRate": 50 } } } }
This is an accepted solution.
Ah, I misunderstood - I thought you were trying to delete metafields.
I can't see an orderDelete mutation, you might need to use the REST API instead.
User | Count |
---|---|
13 | |
12 | |
7 | |
4 | |
4 |