A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
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.
Solved! Go to the solution
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.
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.