Get release file

releaseFile(projectReference: String!, releaseReference: String!, fileReference: String!, includeServerFunctions: Boolean, fields: String): ReleaseFile!

Requires project.read.

Arguments

ArgumentTypeRequiredDescription
projectReferenceString!YesProject UUID, slug or configured domain.
releaseReferenceString!YesRelease ID, latest or a version specifier.
fileReferenceString!YesProject-relative file path, for example pages/index.mdx, or file ID.
includeServerFunctionsBooleanNoSet to false to read server-function source only as an editor. Omit to use the rule every GraphQL file read uses.
fieldsStringNoAccepted as on REST, for example (id,path,size); the selection set chooses the fields GraphQL serves.

Response

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

FieldTypeDescription
binaryBinaryCompanionDescriptorImmutable binary companion identity, when this version carries one.
idID!File ID.
versionIdID!ID of the file version the release pins.
pathString!Project-relative file path.
contentString!File content at the pinned version.
typeString!File kind: page, function, component or file.
sizeFloat!Content size in bytes.
updatedAtDateTime!RFC 3339 time the pinned version was written.

All fields of ReleaseFile.

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

Example

graphql
query ReleaseFile($projectReference: String!, $releaseReference: String!, $fileReference: String!, $includeServerFunctions: Boolean, $fields: String) {
  releaseFile(projectReference: $projectReference, releaseReference: $releaseReference, fileReference: $fileReference, includeServerFunctions: $includeServerFunctions, fields: $fields) {
    id
    updatedAt
    content
    links
    path
  }
}
json
{
  "projectReference": "00000000-0000-4000-8000-000000000001",
  "releaseReference": "example",
  "fileReference": "example"
}