A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hey @Haitham147 , that's a great question.
The orders object doesn't currently contain a specific filter for refund creation date, however you can use the updated_at date which in most cases would probably get you close to the date of the refund.
Here's an example mutation that filters orders based on being refunded and the last updated after a specific date
query {
orders(first: 10, , query: "financial_status:refunded AND updated_at:>2023-11-01") {
edges {
node {
id
displayFinancialStatus
processedAt
updatedAt
transactions(first:10) {
id
processedAt
kind
}
}
}
}
}
I included the transactions in this query so you can pull in the specific date the refund was processed.
This is the documentation I've used as the starting point for this query. https://shopify.dev/docs/api/admin-graphql/2023-10/queries/orders
Hope that helps!
- Kyle G.
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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