> ## Documentation Index
> Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Ensure current style artifact build (legacy)

> Ensure style build.

`ensureCurrentStyleArtifactBuild(input: StyleArtifactBuildInput!): ProjectStyleArtifact!`

Requires project.files.write.

**Deprecated.** Style artifacts are served on REST only.

Use Start style artifact build (`startStyleArtifactBuild`) on REST instead.

**Deprecated:** Use the REST operation startStyleArtifactBuild. (CR-style-artifact-graphql-fields)

## Arguments

| Argument | Type | Required |
| - | - | - |
| `input` | [`StyleArtifactBuildInput!`](https://veryfront.com/docs/cloud/graphql/types/styleartifactbuildinput) | Yes |

## Input fields

### input

[`StyleArtifactBuildInput`](https://veryfront.com/docs/cloud/graphql/types/styleartifactbuildinput)

| Field | Type | Required | Description |
| - | - | - | - |
| `projectReference` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | No | |
| `projectId` | [`ID`](https://veryfront.com/docs/cloud/graphql/types/id) | No | Deprecated: Use projectReference. |
| `styleProfileHash` | [`String!`](https://veryfront.com/docs/cloud/graphql/types/string) | Yes | |
| `branch` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | No | Exactly one of branch, environmentName, or releaseId is required. Main may be implicit. |
| `environmentName` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | No | |
| `releaseId` | [`ID`](https://veryfront.com/docs/cloud/graphql/types/id) | No | |
| `force` | [`Boolean`](https://veryfront.com/docs/cloud/graphql/types/boolean) | No | Default false reuses ready/building metadata; true queues a new build. Default: `false`. |

## Response

Returns [`ProjectStyleArtifact!`](https://veryfront.com/docs/cloud/graphql/types/projectstyleartifact). Open the type for its fields and nested types.

| Field | Type | Description |
| - | - | - |
| `status` | [`StyleArtifactStatus!`](https://veryfront.com/docs/cloud/graphql/types/styleartifactstatus) | Current metadata state: ready, missing, building, or failed. |
| `artifactHash` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | Registered CSS artifact hash, or null when unavailable. |
| `assetPath` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | Registered CSS asset path, or null when unavailable. |
| `etag` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | Registered CSS asset entity tag, or null when unavailable. |
| `contentType` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | Registered CSS asset MIME type, or null when unavailable. |
| `buildRunId` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | Style build run identifier, or null when unavailable. |
| `failureReason` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | Persisted failure detail, or null when unavailable. |
| `updatedAt` | [`DateTime`](https://veryfront.com/docs/cloud/graphql/types/datetime) | Most recent metadata update timestamp, or null for missing metadata. |

Types marked with `!` cannot be null. Lists use `[Type]` notation. The [type index](https://veryfront.com/docs/cloud/graphql/schema.md) lists all published input and response types.

## Example

```graphql title="query.graphql" theme={null}
mutation EnsureCurrentStyleArtifactBuild($input: StyleArtifactBuildInput!) {
  ensureCurrentStyleArtifactBuild(input: $input) {
    status
    updatedAt
    artifactHash
    assetPath
    buildRunId
  }
}
```

```json title="variables.json" theme={null}
{
  "input": {
    "projectReference": "00000000-0000-4000-8000-000000000001",
    "styleProfileHash": "example"
  }
}
```

<details>
  <summary>Try this mutation</summary>

  Calls use `https://api.veryfront.com/graphql`. Replace sample values with resources you can access. See [Authentication](https://veryfront.com/docs/cloud/authentication.md) for credentials and permissions.

  Bearer token or API key

  Stored in this tab's session. Clear credential

  Mutation

  Variables (JSON)
</details>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.