BulkQuery JSONL missing nested values

Solved

BulkQuery JSONL missing nested values

greenleafmedia
Visitor
2 1 0

I'm having an issue with the Bulk Query for GraphQL.  When I enter my query into the GraphiQL App directly it processes fine and returns the results I'm expecting:

 

Query:

{
  orders(first: 1, query: "name:TEST-1002") {
    edges {
      node {
        id
        name
        fulfillmentOrders(first: 10) {
          edges {
            node {
              id
              lineItems(first: 10) {
                edges {
                  node {
                    id
                    remainingQuantity
                    totalQuantity
                    lineItem {
                      variant {
                        barcode
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

 

Results

{
  "data": {
    "orders": {
      "edges": [
        {
          "node": {
            "id": "gid://shopify/Order/123456789012",
            "name": "TEST-1002",
            "fulfillmentOrders": {
              "edges": [
                {
                  "node": {
                    "id": "gid://shopify/FulfillmentOrder/XXXXXXXXXXXX",
                    "lineItems": {
                      "edges": [
                        {
                          "node": {
                            "id": "gid://shopify/FulfillmentOrderLineItem/XXXXXXXXXXXX",
                            "remainingQuantity": 1,
                            "totalQuantity": 1,
                            "lineItem": {
                              "variant": {
                                "barcode": "AAAAAAAAAA"
                              }
                            }
                          }
                        },
                        {
                          "node": {
                            "id": "gid://shopify/FulfillmentOrderLineItem/XXXXXXXXXX",
                            "remainingQuantity": 1,
                            "totalQuantity": 1,
                            "lineItem": {
                              "variant": {
                                "barcode": "BBBBBBBBBB"
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              ]
            }
          }
        }
      ]
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 335,
      "actualQueryCost": 14,
      "throttleStatus": {
        "maximumAvailable": 1000,
        "currentlyAvailable": 986,
        "restoreRate": 50
      }
    }
  }
}

However, when I run this as a bulk query, the JSONL file returned is just:

 

{"id":"gid:\/\/shopify\/Order\/XXXXXXXXXX","name":"TEST-1002"}

 

None of the nested connections are showing up even though they work in GraphiQL.  Any idea why the JSONL wouldn't be including the full dataset?  I'm not getting any errors anywhere along the line.

Accepted Solution (1)

greenleafmedia
Visitor
2 1 0

This is an accepted solution.

For posterity - It was permission issues.  Permissions issues within the subquery when using the bulk query mutation won't throw an error.  It just won't return those areas for which you don't have access.

View solution in original post

Reply 1 (1)

greenleafmedia
Visitor
2 1 0

This is an accepted solution.

For posterity - It was permission issues.  Permissions issues within the subquery when using the bulk query mutation won't throw an error.  It just won't return those areas for which you don't have access.