List project resources

projectResourcesPage(projectReference: String!, sourceTargetKind: SourceTargetKind, runtimeTargetKind: RuntimeTargetKind, targetEnvironmentId: ID, targetBranchId: ID): ProjectResourceList!

Requires project.resources.read.

Arguments

ArgumentTypeRequiredDescription
projectReferenceString!Yes
sourceTargetKindSourceTargetKindNoThe source to read; default runtimeTargetKind, else project.
runtimeTargetKindRuntimeTargetKindNoUsed as the source to read when sourceTargetKind is omitted.
targetEnvironmentIdIDNoRequired with the kind environment.
targetBranchIdIDNoRequired with the kind preview_branch.

Response

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

FieldTypeDescription
data[ProjectResource!]!
pageInfoPageInfo!
diagnostics[ProjectSourceFileDiagnostic!]!Resource source files that could not be read as a project resource.

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

Example

query.graphql
query ProjectResourcesPage($projectReference: String!, $sourceTargetKind: SourceTargetKind, $runtimeTargetKind: RuntimeTargetKind, $targetEnvironmentId: ID, $targetBranchId: ID) {  projectResourcesPage(projectReference: $projectReference, sourceTargetKind: $sourceTargetKind, runtimeTargetKind: $runtimeTargetKind, targetEnvironmentId: $targetEnvironmentId, targetBranchId: $targetBranchId) {    data {      id      description      editMode      pattern      sourcePath    }    pageInfo {      hasNextPage      endCursor      hasPreviousPage      startCursor    }    diagnostics {      code      details      kind      message      sourceId    }  }}
variables.json
{  "projectReference": "00000000-0000-4000-8000-000000000001"}