How can I retrieve discount details from an order using GraphQL?

JackL
Shopify Partner
14 0 9

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)