List environments

environmentsPage(input: EnvironmentsPageInput!): EnvironmentList!

Requires project.read.

Arguments

ArgumentTypeRequired
inputEnvironmentsPageInput!Yes

Input fields

input

EnvironmentsPageInput

FieldTypeRequiredDescription
projectReferenceString!YesProject ID or slug.
cursorStringNoCursor for pagination: an environment ID from this project. An unknown cursor is rejected.
limitIntNoPage size, 1 to 100. Defaults to 20.
sortByEnvironmentSortByNoSort field. Defaults to name.
sortOrderEnvironmentSortOrderNoSort order. Defaults to asc.

Response

Returns EnvironmentList!. Open the type for its fields and nested types.

FieldType
data[Environment!]!
pageInfoPageInfo!

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

query.graphql
query EnvironmentsPage($input: EnvironmentsPageInput!) {  environmentsPage(input: $input) {    data {      id      projectId      name      createdAt      updatedAt    }    pageInfo {      hasNextPage      endCursor      hasPreviousPage      startCursor    }  }}
variables.json
{  "input": {    "projectReference": "00000000-0000-4000-8000-000000000001"  }}