customerGroups
QueryRetrieves a paged list of customers with optional filtering, sorting, and full-text search.
Arguments
- String
after Returns the elements in the list that come after the specified cursor.
- String
before Returns the elements in the list that come before the specified cursor.
- Int
first Returns the first n elements from the list.
- Int
last Returns the last n elements from the list.
- String
query - A filter expression made up of terms, boolean operators, modifiers, and comparators. Combine one or more filters in a single query.
Available filters4
defaultstringSearches indexed customer-group names and descriptions. Every term must match.
Examplewholesale customersidIDMatches a customer group by its unique identifier.
Exampleid:cusgrp_...namestringMatches the customer group name.
Examplename:"Wholesale customers"descriptionstringMatches the customer group description.
Exampledescription:wholesale*
- SortDirection
sortDirection Sort direction (ascending or descending).
Possible enum valuesASCOrders values from lowest to highest or alphabetically from A to Z.
DESCOrders values from highest to lowest or alphabetically from Z to A.
- CustomerGroupSortKeys
sortKey Field key to sort by.
Possible enum valuesIDSort by customer group `ID`.
NAMESort by the `name` value.
Payload
- [CustomerGroupEdge!]
edges A list of edges.
- [CustomerGroup!]
nodes A flattened list of the nodes
- PageInfo!
pageInfo Information to aid in pagination.
- Int!
totalCount Identifies the total count of items in the connection.