Covers all questions related to inventory management, order fulfillment, and shipping.
Hi,
I want to fetch all orders including their fulfillment and refund line items.
When I execute the bulk GraphQL query below, I get the following error message:
"Queries that contain a connection field within a list field are not currently supported."
This is caused by orders.fulfillments.fulfillmentLineItems and order.refunds.refundLineItems.
I believe I can get the same information with the REST API faster when such queries are not supported by the GraphQL bulk queries.
The bulk query is:
If I convert this to a regular query, the cost is 241 for getting 25 orders - meaning it will take 5s to refill the bucket with this cost? With the REST API I would be able to get 500 orders per second.
The regular query is:
Am I overlooking something?
Thanks,
-Louise
Solved! Go to the solution
This is an accepted solution.
Hey @Lull,
I checked your query and can confirm the error you're receiving is expected when trying to preform a bulk operation on the orders object using refundLineItems
or fulfillments
with connections. Although this isn't currently supported, you should be able to get the desired information from connections available directly on the order object. I put together this query which grabs refund and fulfillment data directly from lineItems
and transactions
:
mutation { bulkOperationRunQuery( query: """ { orders { edges { node { id totalPriceSet { shopMoney { amount }} name displayFinancialStatus displayFulfillmentStatus lineItems { edges { node { id variant { id } quantity fulfillmentStatus fulfillableQuantity refundableQuantity }}} transactions { id kind amountSet { shopMoney { amount }}}}}}} """ ) { bulkOperation { id status } userErrors { field message }}
JB | Solutions Engineer @ Shopify
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
This is an accepted solution.
Hey @Lull,
I checked your query and can confirm the error you're receiving is expected when trying to preform a bulk operation on the orders object using refundLineItems
or fulfillments
with connections. Although this isn't currently supported, you should be able to get the desired information from connections available directly on the order object. I put together this query which grabs refund and fulfillment data directly from lineItems
and transactions
:
mutation { bulkOperationRunQuery( query: """ { orders { edges { node { id totalPriceSet { shopMoney { amount }} name displayFinancialStatus displayFulfillmentStatus lineItems { edges { node { id variant { id } quantity fulfillmentStatus fulfillableQuantity refundableQuantity }}} transactions { id kind amountSet { shopMoney { amount }}}}}}} """ ) { bulkOperation { id status } userErrors { field message }}
JB | Solutions Engineer @ Shopify
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Hi _JB,
Thanks, I think that might do the trick, otherwize I'll get back to you.
-Louise
Hello, how about getting the fulfillment date and time ? Getting when was the line item fulfilled.