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:
mutation {
bulkOperationRunQuery(
query: “”"
{
orders{
edges{
cursor
node{
id
name
displayFinancialStatus
displayFulfillmentStatus
totalPrice
lineItems{
edges{
node{
id
variant{
id
}
quantity
}
}
}
fulfillments{
fulfillmentLineItems{
edges{
node{
id
lineItem{
id
variant{
id
}
}
quantity
}
}
}
}
refunds{
refundLineItems{
edges{
node{
lineItem{
id
variant{
id
}
}
quantity
}
}
}
}
updatedAt
cancelledAt
closedAt
}
}
}
}
“”"
) {
bulkOperation {
id
status
}
userErrors {
field
message
}
}
}
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:
query
{
orders (first:25 after: “eyJsYXN0X2lkIjoxMjg4MDg2OTc4NjA4LCJsYXN0X3ZhbHVlIjoiMjAxOS0wOC0wOSAwOTo1MTo0NSJ9”){
edges{
cursor
node{
id
name
displayFinancialStatus
displayFulfillmentStatus
totalPrice
lineItems(first:5){
edges{
node{
id
variant{
id
}
quantity
}
}
}
fulfillments{
fulfillmentLineItems{
edges{
node{
id
lineItem{
id
variant{
id
}
}
quantity
}
}
}
}
refunds{
refundLineItems (first:5){
edges{
node{
lineItem{
id
variant{
id
}
}
quantity
}
}
}
}
updatedAt
cancelledAt
closedAt
}
}
pageInfo{
hasNextPage
}
}
}
Am I overlooking something?
Thanks,
-Louise