GraphQL orders query, filtering by financial_status doesn't seem to work

GraphQL orders query, filtering by financial_status doesn't seem to work

DIW
Shopify Partner
9 0 3

I am trying to filter orders by their financial status and it keeps returning all orders. Even in the example in the documentation it doesn't seem to work as intended: https://shopify.dev/api/admin-graphql/2022-10/queries/orders#examples-Get_the_first_10_orders_with_a...

 

The example shows both PAID and AUTHORIZED orders. Though, perhaps it included paid because it is a state that comes after authorized. However, my query keeps giving me all orders, which are all in pending. Here is what I'm using to make the query.

 

 

query {
  orders(first:20, query: "financial_status:PAID"){
    edges{
      node{
        id
        name
        displayFinancialStatus
      }
    }
  }
}

 

 

This is the output I get.

 

{
  "data": {
    "orders": {
      "edges": [
        {
          "node": {
            "id": "gid://shopify/Order/",
            "name": "#1001",
            "displayFinancialStatus": "PENDING"
          }
        },
        {
          "node": {
            "id": "gid://shopify/Order/",
            "name": "#1002",
            "displayFinancialStatus": "PENDING"
          }
        },
        {
          "node": {
            "id": "gid://shopify/Order/",
            "name": "#1003",
            "displayFinancialStatus": "PENDING"
          }
        },
        {
          "node": {
            "id": "gid://shopify/Order/",
            "name": "#1004",
            "displayFinancialStatus": "PENDING"
          }
        },
        {
          "node": {
            "id": "gid://shopify/Order/",
            "name": "#1005",
            "displayFinancialStatus": "PENDING"
          }
        },
        {
          "node": {
            "id": "gid://shopify/Order/",
            "name": "#1006",
            "displayFinancialStatus": "PENDING"
          }
        },
        {
          "node": {
            "id": "gid://shopify/Order/",
            "name": "#1007",
            "displayFinancialStatus": "PENDING"
          }
        }
      ]
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 22,
      "actualQueryCost": 9,
      "throttleStatus": {
        "maximumAvailable": 1000,
        "currentlyAvailable": 991,
        "restoreRate": 50
      }
    }
  }

 

 

Is there something else I need to do to get this query working?

Replies 2 (2)

KikuchiM
Shopify Partner
1 0 4

I encounter the same problem but I solved by lower case.

 

orders(first:20, query: "financial_status:paid")

KetlimLL
Shopify Partner
1 0 0

Yes, it works by using lower case, thanks!