Skip to content

List Customer Groups (GraphQL)

Lists customer groups as a cursor-paginated connection. Supports code / name / is_user_defined filter args and sort / order. customersCount is a detail-only field and comes back null on listing rows — fetch a single group to get its count.

Arguments

All arguments are optional and combine in a single query — filter, sort and paginate together.

Pagination

ArgumentDescription
firstNumber of records to return.
afterCursor to fetch the page after (from pageInfo.endCursor).

Filters

Each filter narrows the result; supplying more than one combines with logical AND.

ArgumentTypeMatch
codeStringPartial code.
nameStringPartial name.
is_user_definedInt0 (system) or 1 (user-defined).

Sorting

ArgumentTypeValues
sortStringid (default), code, name
orderStringasc, desc (default desc)

Menu overview

See the Customer Groups overview for what customer groups do and how they relate to the rest of the store.

All admin operations require an admin Bearer token — see Authentication.

Released under the MIT License.