Retrieves a paginated list of plans with optional filtering and sorting.
Query
query ListPlans(
$filter: PlanFilter
$paging: CursorPaging
$sorting: [PlanSort!]
) {
plans(filter: $filter, paging: $paging, sorting: $sorting) {
edges {
node {
refId
displayName
description
status
pricingType
versionNumber
basePlan {
refId
}
product {
refId
displayName
}
prices {
billingModel
billingPeriod
price {
amount
currency
}
}
packageEntitlements {
... on PackageEntitlement {
feature {
refId
displayName
featureType
}
hasUnlimitedUsage
usageLimit
}
}
}
cursor
}
pageInfo {
hasNextPage
endCursor
}
totalCount
}
}
{
"filter": {
"status": { "eq": "PUBLISHED" },
"isLatest": { "is": true }
},
"paging": {
"first": 20
}
}
{
"data": {
"plans": {
"edges": [
{
"node": {
"refId": "plan-pro",
"displayName": "Pro Plan",
"description": "For growing teams",
"status": "PUBLISHED",
"pricingType": "PAID",
"versionNumber": 3,
"basePlan": null,
"product": {
"refId": "product-main",
"displayName": "Main Product"
},
"prices": [
{
"billingModel": "FLAT_FEE",
"billingPeriod": "MONTHLY",
"price": {
"amount": 99,
"currency": "USD"
}
}
],
"packageEntitlements": [
{
"feature": {
"refId": "feature-api-calls",
"displayName": "API Calls",
"featureType": "NUMBER"
},
"hasUnlimitedUsage": false,
"usageLimit": 10000
}
]
},
"cursor": "abc123"
}
],
"pageInfo": {
"hasNextPage": false,
"endCursor": "abc123"
},
"totalCount": 5
}
}
}
Parameters
Filter criteria for plans
Filter by plan reference ID
status
PackageStatusFilterComparison
Filter by status: DRAFT, PUBLISHED, ARCHIVED
pricingType
PricingTypeFilterComparison
Filter by pricing type: FREE, PAID, CUSTOM
Filter to only latest versions
Filter by billing provider ID
Sorting options with fields: createdAt, displayName, refId, status
Return Type
Returns a PlanConnection with plan objects containing:
| Field | Type | Description |
|---|
refId | String | Plan reference ID |
displayName | String | Display name |
description | String | Plan description |
status | PackageStatus | DRAFT, PUBLISHED, ARCHIVED |
pricingType | PricingType | FREE, PAID, CUSTOM |
versionNumber | Int | Current version |
basePlan | Plan | Parent plan (if inheriting) |
product | Product | Associated product |
prices | [Price] | Plan pricing |
packageEntitlements | [PackageEntitlement] | Included entitlements |
compatibleAddons | [Addon] | Compatible addons |
Common Use Cases
Fetch all published plans to display on a pricing page.
List all plans including drafts for admin interfaces.
Query plans to build feature comparison tables.