Get type of discounts used in order

JackL
Shopify Partner
8 0 1

I have a discount that applied in a order and it showing this details in the order detail in admin panel

JackL_1-1695743373530.png

 

I was trying to retrieve this detail from the graphql, the following is the approach I made

        query ($numProducts: Int!, $cursor: String, $query: String!) {
          orders(first: $numProducts, after: $cursor, query: $query) {
            edges {
              node {
                createdAt
                lineItems(first: 20) {
                  nodes {
                    id
                  }
                }
              }
            }
            pageInfo {
              hasNextPage
              endCursor
            }
          }
        }

I not sure how do I get it from graphql, do anyone have idea?

Replies 0 (0)