Could someone please tak a look at this ? Cant design a bulk query for ordes with ALL attributes

TonyJ
Excursionist
16 1 0

Hello All,

I have the issue that i need to pull ALL Orders from Shopify not having any limitations in number or created at
Also I want the full order JSON. Exactly the same as if I would use the normal Order API (https://shopify.dev/docs/admin-api/rest/reference/orders/order)

So I designed a Bulk query. Its not complete but even the attributes below are NOT allowed which are normally in the Orders.json

Invalid bulk query: Field 'closed_at' doesn't exist on type 'Order'"
Invalid bulk query: Field 'created_at' doesn't exist on type 'Order'"
Invalid bulk query: Field 'updated_at' doesn't exist on type 'Order'"
Invalid bulk query: Field 'number' doesn't exist on type 'Order'"

Could someone give me an idea how i should proceed?
Any idea is welcome. Thanks in advance

BR. Tony

The Bulk Query

mutation {
bulkOperationRunQuery(
query: """
{
orders(query: "created_at:>=2020-01-01") {
edges {
node {
id
email
closed_at
created_at
updated_at
number


}
}
}
}
"""
) {
bulkOperation {
id
status
}
userErrors {
field
message
}
}
}

 

0 Likes
syf_
Shopify Staff
Shopify Staff
89 20 15

Hi @TonyJ,

Since the Bulk Query API is a GraphQL request you should be looking at fields in the GraphQL Admin API (can be found here) and not the REST Admin API.

Hopefully this should solve the issue you're experiencing.

 

Best,

Seth.

syf_ | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes