What values can I set to the Graphql Orders query argument?

Solved

What values can I set to the Graphql Orders query argument?

shojik
Shopify Partner
3 1 1

 I would like to get the specified Orders by graphql query
https://shopify.dev/api/admin-graphql/2022-07/queries/orders#argument-orders-query.

I know what keys I can specify for query, but what values I can set? Any documentation?

For example, what values can I specify for "status" parameter?
I looked at https://shopify.dev/api/admin-graphql/2022-07/objects/Order.
There is displayFinancialStatus and displayFulfillmentStatus, but no status field.

Accepted Solution (1)

shojik
Shopify Partner
3 1 1

This is an accepted solution.

I found it.

 

Open show filters under query here https://shopify.dev/docs/api/admin-graphql/2024-07/objects/Order , I can see the parameters I can use for query.

 

https://gyazo.com/3ca94654165380d955ca95861f6a846e

 

I wonder why "status" exists there. No status field in Order object https://shopify.dev/docs/api/admin-graphql/2024-07/objects/Order

 

But I am almost clear now.

 

View solution in original post

Replies 2 (2)

thall1961
Shopify Partner
1 0 0

https://shopify.dev/docs/api/usage/search-syntax

 

example query

 

 

query getProducts {
  orders(first:15, query:"name:#1001") {
    nodes {
      name
    }
  }
}

 

 

 

example using state

query=state:enabled OR state:disabled

hope that helps!

shojik
Shopify Partner
3 1 1

This is an accepted solution.

I found it.

 

Open show filters under query here https://shopify.dev/docs/api/admin-graphql/2024-07/objects/Order , I can see the parameters I can use for query.

 

https://gyazo.com/3ca94654165380d955ca95861f6a846e

 

I wonder why "status" exists there. No status field in Order object https://shopify.dev/docs/api/admin-graphql/2024-07/objects/Order

 

But I am almost clear now.