How to query OrderAdjustment

Yuxin_x
Tourist
4 0 0

Hi everyone!!

 

Do you know how to query orderAdjustment object? ( Order Adjustment: https://shopify.dev/api/admin/graphql/reference/orders/orderadjustment)

 

I've tried using it in Order:

 

{
  order(id: "gid://shopify/Order/123") {
    orderAdjustments(first:10) {
      edges {
        node {
          id
        }
      }
    }
  }
}

 

And Refund:

 

{
  order(id: "gid://shopify/Order/123") {
    refunds(first:10){
      orderAdjustments(first:10) {
        edges {
          node {
            id
          }
        }
      }	
    }
  }
}

 

None of them are working yet. 

 

I got the following error: 

 

"Field 'orderAdjustments' doesn't exist on type 'Order'"
"Field 'orderAdjustments' doesn't exist on type 'Refund'"

 

 

 

There was a previous post about this, however the query is no longer working: https://community.shopify.com/c/shopify-apis-and-sdks/refunding-using-the-graphql-api-querying-the-e...

I've tried both older and the latest 2021-07 App version ~

Thank you in advance! 

0 Likes
jaycean
New Member
2 0 0

Hi, I also have the same problem I have tried everything but nothing works.

0 Likes
Yuxin_x
Tourist
4 0 0

Hi @jaycean 

 

I heard back from Shopify Staff, it seems the OrderAdjustment is still only available on the `unstable` version, at the time of this writing. I tried unstable one and it worked..  

/admin/api/unstable/graphql.json

 

https://community.shopify.com/c/shopify-apis-and-sdks/refunding-using-the-graphql-api-querying-the-e...

0 Likes