Graphql query return null for Product when using Shopify GraphiQL App

Solved
hedleydonna
New Member
3 1 1

I need to return the tags associated for each product for each order. I am able to get back information about the order, but the product is always null. What am I missing?

 

{
  orders(first: 10) {
    edges {
      node {
        currencyCode
        lineItems(first: 10) {
          edges {
            node {
              title
              id
              product {
                id
                tags
              }
            }
          }
        }
      }
    }
  }
}

 

 

{
  "data": {
    "orders": {
      "edges": [
        {
          "node": {
            "currencyCode": "CAD",
            "lineItems": {
              "edges": [
                {
                  "node": {
                    "title": "morning field",
                    "id": "gid://shopify/LineItem/9688099127501",
                    "product": null
                  }
                }
              ]
            }
          }
        }
      ]
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 232,
      "actualQueryCost": 7,
      "throttleStatus": {
        "maximumAvailable": 1000,
        "currentlyAvailable": 993,
        "restoreRate": 50
      }
    }
  }
}

 

0 Likes
hedleydonna
New Member
3 1 1

This is an accepted solution.

I think I may have answered my own question. I had populated the development store with test draft orders which were pointing to non existent products. Once I figured out how to create dummy orders using the bogus gateway, attaching real dummy products, the tags showed up.