A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hi All,
I am new to graphQL and struggling a little
I am trying to get a list of all fulfilments on a given date. this is what I have so far
{
orders(first:10 reverse:true, query: "fulfillment_status:shipped") {
edges {
node {
id
displayFulfillmentStatus
fulfillments {
id
status
createdAt
trackingInfo {
company
number
url
}
}
}
}
}
}
The issue I am having I can not work out how to return just the fulfilments with a createdAt date specified
Any help much appreciated.
Hey @Alrighte,
Thanks for your post.
I would suggest you also filter your query with created_at following this developer document on orders queries and what filters you can add.
Also, you can learn more about GraphQL queries and more to help build your knowledge on all things GraphQL.
I hope that helps!
To learn more visit the Shopify Help Center or the Community Blog.
Hi @kevnob
That what I have been trying to do
From what I can understand from the documentation Orders doesn't have a fulfilledOnDate (or similar) in its query parameters.
This is the latest code I have which is pretty much what I need to work but it doesn't
{
orders(first:10 reverse:true, query: "fulfillment_status:shipped") {
edges {
node {
id
displayFulfillmentStatus
fulfillments (first: 20, query:"createdAt:>2022-08-22") {
id
status
createdAt
trackingInfo {
company
number
url
}
}
}
}
}
}
It errors with
"message": "Field 'fulfillments' doesn't accept argument 'query'",
If I got to the Shipping and fulfillment section of the documentation you sent and look at the fulfillment/fulfillmentOrder/fulfillmentService the only query parameter that it appears I can use is ID, again this doesn't help me.
So I am not sure how I am meant to get the a list of the orders that have been fulfilled for a given date. Clearly the above is not allowed, but I am sure shopify would be able to get this basic data without retrieving the whole order data set every time?
I switched to looking at the graphQL when I could not find a way to get this data with the REST Api. I am happy to use either but I need some help with working out how to extract the list I need.
Any help with working out how to actually access that data would be really appreciated.
Thanks