Docs
Dashboard

customers

Query

Retrieves a paged list of customers with optional filtering, sorting, and full-text search.

#

Arguments


after
String

Returns the elements in the list that come after the specified cursor.

before
String

Returns the elements in the list that come before the specified cursor.

first
Int

Returns the first n elements from the list.

last
Int

Returns the last n elements from the list.

query
String
A filter expression made up of terms, boolean operators, modifiers, and comparators. Combine one or more filters in a single query.
Available filters6
  • defaultstring

    Searches indexed customer names and email addresses. Every term must match.

    ExamplesAlex Jensenbuyer@example.com
  • idID

    Matches a customer by their unique identifier.

    Exampleid:cus_...
  • first_namestring

    Matches the customer's first name.

    Examplefirst_name:Alex
  • last_namestring

    Matches the customer's last name.

    Examplelast_name:Jensen
  • emailstring

    Matches the customer's email address.

    Exampleemail:buyer@example.com
  • created_atdate

    Compares the customer creation date using an ISO 8601 date or timestamp.

    Examplecreated_at:>="2026-01-01"
sortDirection
SortDirection

Sort direction (ascending or descending).

Possible enum values
  • ASC

    Orders values from lowest to highest or alphabetically from A to Z.

  • DESC

    Orders values from highest to lowest or alphabetically from Z to A.

sortKey
CustomerSortKeys

Field key to sort by.

Possible enum values
  • CREATED_AT

    Sort by the date and time the customer was created.

  • ID

    Sort by customer `ID`.

  • NAME

    Sort by the `name` value.

  • ORDERS_COUNT

    Sort by the number of orders associated with the customer.

#

Payload


edges
[CustomerEdge!]

A list of edges.

nodes
[Customer!]

A flattened list of the nodes

pageInfo
PageInfo!

Information to aid in pagination.

totalCount
Int!

Identifies the total count of items in the connection.