Internal error in case if refund and suggestedRefund fields are both present in single GraphQL query

Internal error in case if refund and suggestedRefund fields are both present in single GraphQL query

Lafroaig
Shopify Partner
3 0 0

Dear support,

 

tried simple query 

{
  orders(first: 10) {
    edges {
      node {
        refunds {
          id
        }
        suggestedRefund {          
          __typename
        }
      }
    }
  }
}

and got error 

{
  "errors": [
    {
      "message": "Internal error. Looks like something went wrong on our end.\nRequest ID: c4fe1810-0a8b-4bf6-b86e-ca5896f54f99 (include this in support requests).",
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR",
        "requestId": "c4fe1810-0a8b-4bf6-b86e-ca5896f54f99"
      }
    }
  ]
}

Thank you

Replies 2 (2)

Liam
Community Manager
3108 340 873

Hi Lafroaig

 

On our side it looks like the API is not receiving data for refunds - the message I'm seeing id "Missing object id for Refund". Just to confirm - are there refunded orders on this store, and does your app have the read_orders scope ?

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

Lafroaig
Shopify Partner
3 0 0

If query has only `refunds` or only `suggestedRefund` field, it returns data. This means there're refunded orders in store.
but my question is why I encounter error in case if query has two such fields?