Company Orders received an error "Query not supported."

Topic summary

A user is attempting to sort company orders by total price using the GraphQL Admin API but encounters a “Query not supported” error.

Query Details:

  • Using the company query with orders connection
  • Attempting to sort with sortKey: TOTAL_PRICE
  • The query works successfully when using CREATED_AT as the sort key

The Problem:
Despite the official Shopify documentation listing TOTAL_PRICE as an available OrderSortKeys value for the Company orders connection, the API rejects this sort key with an error.

Current Status:
The issue remains unresolved. The user is seeking clarification on whether there’s an implementation error in their GraphQL variables or if this represents a discrepancy between the documented API capabilities and actual functionality.

Summarized with AI on November 11. AI used: claude-sonnet-4-5-20250929.

I want to sort the company orders based on the total price.

Query :

query CompanyOrders($companyId: ID!, $before: String, $after: String, $first: Int, $last: Int, $businessSortKey: OrderSortKeys, $reverse: Boolean!) {
  company(id: $companyId) {
    id
    name
    orders(
      first: $first
      last: $last
      before: $before
      after: $after
      sortKey: $businessSortKey
      reverse: $reverse
    ) {
      edges {
        node {
          createdAt
          name
          customer {
            displayName
          }
        }
      }
    }
  }
}

Variables :

{
  "companyId": "gid://shopify/Company/*********",
  "first": 50,
  "businessSortKey": "TOTAL_PRICE",
  "reverse": true
}

But I received an error message ‘Query not supported.’ and strangely when I use the “CREATED_AT” key it works.

even though in docs, sortKey for “TOTAL_PRICE” is available.

"errors": [
    {
      "message": "Query not supported.",
      "locations": [
        {
          "line": 5,
          "column": 5
        }
      ],
      "path": [
        "company",
        "orders"
      ]
    }
  ],

Is there something wrong with how I’m implementing the GraphQL variable?"

Any tips would be highly appreciated!