# Input types (/api/inputs)



{/* AUTO-GENERATED by scripts/generate-graphql-docs.mjs from @alternatefutures/backend@0.1.2. Do not edit by hand. */}

<Callout type="info">
  Generated from the API server source (@alternatefutures/backend 0.1.2) on every merge. Endpoint
  `https://api.alternatefutures.ai/graphql`, header `Authorization: Bearer <personal access token>`.
  See the [GraphQL API overview](/api) for how to call it. Left out on purpose: provider-specific types, fields and arguments; operations of the retired hosting product (sites, IPFS storage, functions) and admin-only operations.
</Callout>

## Service links (inter-service connections) [#service-links-inter-service-connections]

### EnvVarInput [#envvarinput]

| Field    | Type      | Description |
| -------- | --------- | ----------- |
| `key`    | `String!` |             |
| `value`  | `String!` |             |
| `secret` | `Boolean` |             |

## Functions [#functions]

### CreateServiceInput [#createserviceinput]

Generic input for creating a Service registry entry.
Used for template-based services and raw compute services
that don't need a specialized AFFunction or Site record.

| Field           | Type                                                  | Description                                                                                                                                                       |
| --------------- | ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`          | `String!`                                             |                                                                                                                                                                   |
| `projectId`     | `ID!`                                                 |                                                                                                                                                                   |
| `type`          | `ServiceType` · [ServiceType](/api/enums#servicetype) |                                                                                                                                                                   |
| `templateId`    | `String`                                              |                                                                                                                                                                   |
| `flavor`        | `String`                                              | Catalog flow discriminator. One of 'docker' \| 'server' \| 'function' \| 'template'. Validated server-side; rejected if any other value. Immutable post-creation. |
| `dockerImage`   | `String`                                              |                                                                                                                                                                   |
| `containerPort` | `Int`                                                 |                                                                                                                                                                   |

### UpdateServiceInput [#updateserviceinput]

Patch a Service registry entry's source-of-truth fields. Used by the
Source tab in the web app to let users set/update the Docker image
reference and container port for VM/raw services after creation.

Changes apply on the next deploy. The mutation rejects updates while
a deployment is in flight (CREATING/WAITING\_BIDS/SELECTING\_BID/
CREATING\_LEASE/SENDING\_MANIFEST/DEPLOYING) so the in-progress lease
isn't operating against stale fields. ACTIVE deployments are fine to
update against: the user must redeploy to pick the new values up.

| Field            | Type     | Description                                                                                                                                                                                                                                                                                                                                               |
| ---------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `dockerImage`    | `String` |                                                                                                                                                                                                                                                                                                                                                           |
| `containerPort`  | `Int`    |                                                                                                                                                                                                                                                                                                                                                           |
| `volumes`        | `JSON`   | Persistent volumes for raw Docker images. Pass an empty array to clear all volumes; pass null to leave unchanged. Each volume requires "name" (lowercase letters/digits/hyphen, max 31 chars), "mountPath" (absolute, no trailing slash), and "size" (e.g. "5Gi", "100Mi"). Max 4 per service. Templates ignore this field.                               |
| `healthProbe`    | `JSON`   | Optional application HTTP health probe. Pass null to remove the probe; pass an object to set/replace it. Required key: path (must start with "/"). Optional keys: port (1-65535), expectStatus (HTTP code, default 200), intervalSec (default 30, clamped 10-3600), timeoutSec (default 5, clamped 1-30).                                                 |
| `failoverPolicy` | `JSON`   | Optional health-aware auto-failover policy. Pass null to remove the policy; pass an object to set/replace it. Required key: enabled (boolean). Optional keys: maxAttempts (default 3, clamped 1-10), windowHours (default 24, clamped 1-720). Refused on services with persistent volumes: that combination would silently lose data on a failover event. |

## Domain registration / purchase [#domain-registration--purchase]

### LoginWithPersonalAccessTokenDataInput [#loginwithpersonalaccesstokendatainput]

Input for exchanging a Personal Access Token for an access token

| Field                 | Type      | Description |
| --------------------- | --------- | ----------- |
| `personalAccessToken` | `String!` |             |
| `projectId`           | `ID`      |             |

## Attestation registry (org-owned allowlist + verified identities) [#attestation-registry-org-owned-allowlist--verified-identities]

### AddAttestationMeasurementInput [#addattestationmeasurementinput]

| Field         | Type      | Description                                         |
| ------------- | --------- | --------------------------------------------------- |
| `measurement` | `String!` | Hex sha256 of the blessed build's app-compose.json. |
| `label`       | `String!` |                                                     |

### RegisterAttestedIdentityInput [#registerattestedidentityinput]

| Field    | Type      | Description                                                                                          |
| -------- | --------- | ---------------------------------------------------------------------------------------------------- |
| `pubkey` | `String!` | Hex Ed25519 public key from the server's GET /identity.                                              |
| `quote`  | `String!` | Raw TDX quote (hex) binding the pubkey (report\_data = sha256(pubkey)).                              |
| `appId`  | `String`  | Optional the confidential compute (TEE) tier CVM app id, used to link the identity to an AF service. |

## Feedback & bug reports [#feedback--bug-reports]

### SubmitFeedbackInput [#submitfeedbackinput]

| Field         | Type                                                                  | Description |
| ------------- | --------------------------------------------------------------------- | ----------- |
| `title`       | `String!`                                                             |             |
| `category`    | `FeedbackCategory!` · [FeedbackCategory](/api/enums#feedbackcategory) |             |
| `location`    | `String`                                                              |             |
| `description` | `String!`                                                             |             |

## Agent chat system [#agent-chat-system]

### CreateAgentInput [#createagentinput]

| Field          | Type      | Description |
| -------------- | --------- | ----------- |
| `name`         | `String!` |             |
| `slug`         | `String!` |             |
| `description`  | `String`  |             |
| `systemPrompt` | `String`  |             |
| `model`        | `String`  |             |
| `functionId`   | `ID`      |             |

### CreateChatInput [#createchatinput]

| Field     | Type     | Description |
| --------- | -------- | ----------- |
| `agentId` | `ID!`    |             |
| `title`   | `String` |             |

### SendMessageInput [#sendmessageinput]

| Field     | Type      | Description |
| --------- | --------- | ----------- |
| `chatId`  | `ID!`     |             |
| `content` | `String!` |             |

## Observability / APM [#observability--apm]

### TraceQueryInput [#tracequeryinput]

| Field           | Type     | Description |
| --------------- | -------- | ----------- |
| `projectId`     | `ID!`    |             |
| `startTime`     | `Date!`  |             |
| `endTime`       | `Date!`  |             |
| `serviceName`   | `String` |             |
| `spanName`      | `String` |             |
| `minDurationMs` | `Float`  |             |
| `maxDurationMs` | `Float`  |             |
| `statusCode`    | `String` |             |
| `traceId`       | `String` |             |
| `limit`         | `Int`    |             |
| `offset`        | `Int`    |             |

### MetricQueryInput [#metricqueryinput]

| Field         | Type                                                                    | Description |
| ------------- | ----------------------------------------------------------------------- | ----------- |
| `projectId`   | `ID!`                                                                   |             |
| `startTime`   | `Date!`                                                                 |             |
| `endTime`     | `Date!`                                                                 |             |
| `metricName`  | `String`                                                                |             |
| `aggregation` | `MetricAggregation` · [MetricAggregation](/api/enums#metricaggregation) |             |
| `interval`    | `String`                                                                |             |
| `limit`       | `Int`                                                                   |             |

### LogQueryInput [#logqueryinput]

| Field               | Type     | Description |
| ------------------- | -------- | ----------- |
| `projectId`         | `ID!`    |             |
| `startTime`         | `Date!`  |             |
| `endTime`           | `Date!`  |             |
| `severityText`      | `String` |             |
| `minSeverityNumber` | `Int`    |             |
| `search`            | `String` |             |
| `traceId`           | `String` |             |
| `limit`             | `Int`    |             |
| `offset`            | `Int`    |             |

### UpdateObservabilitySettingsInput [#updateobservabilitysettingsinput]

| Field             | Type      | Description |
| ----------------- | --------- | ----------- |
| `tracesEnabled`   | `Boolean` |             |
| `metricsEnabled`  | `Boolean` |             |
| `logsEnabled`     | `Boolean` |             |
| `traceRetention`  | `Int`     |             |
| `metricRetention` | `Int`     |             |
| `logRetention`    | `Int`     |             |
| `sampleRate`      | `Float`   |             |
| `maxBytesPerHour` | `String`  |             |

## Deployment policy (budget, GPU, runtime constraints) [#deployment-policy-budget-gpu-runtime-constraints]

### DeploymentPolicyInput [#deploymentpolicyinput]

| Field                 | Type        | Description |
| --------------------- | ----------- | ----------- |
| `acceptableGpuModels` | `[String!]` |             |
| `gpuUnits`            | `Int`       |             |
| `gpuVendor`           | `String`    |             |
| `maxBudgetUsd`        | `Float`     |             |
| `maxMonthlyUsd`       | `Float`     |             |
| `runtimeMinutes`      | `Int`       |             |

## Templates [#templates]

### EnvOverrideInput [#envoverrideinput]

| Field   | Type      | Description |
| ------- | --------- | ----------- |
| `key`   | `String!` |             |
| `value` | `String!` |             |

### GpuOverrideInput [#gpuoverrideinput]

| Field    | Type      | Description |
| -------- | --------- | ----------- |
| `units`  | `Int!`    |             |
| `vendor` | `String!` |             |
| `model`  | `String`  |             |

### ResourceOverrideInput [#resourceoverrideinput]

| Field     | Type                                                                  | Description |
| --------- | --------------------------------------------------------------------- | ----------- |
| `cpu`     | `Float`                                                               |             |
| `memory`  | `String`                                                              |             |
| `storage` | `String`                                                              |             |
| `gpu`     | `GpuOverrideInput` · [GpuOverrideInput](/api/inputs#gpuoverrideinput) |             |

### DeployFromTemplateInput [#deployfromtemplateinput]

| Field               | Type                                                                                 | Description |
| ------------------- | ------------------------------------------------------------------------------------ | ----------- |
| `templateId`        | `String!`                                                                            |             |
| `projectId`         | `ID!`                                                                                |             |
| `serviceName`       | `String`                                                                             |             |
| `envOverrides`      | `[EnvOverrideInput!]` · [EnvOverrideInput](/api/inputs#envoverrideinput)             |             |
| `resourceOverrides` | `ResourceOverrideInput` · [ResourceOverrideInput](/api/inputs#resourceoverrideinput) |             |
| `policy`            | `DeploymentPolicyInput` · [DeploymentPolicyInput](/api/inputs#deploymentpolicyinput) |             |

### ComponentTargetInput [#componenttargetinput]

| Field               | Type                                                                                 | Description |
| ------------------- | ------------------------------------------------------------------------------------ | ----------- |
| `componentId`       | `String!`                                                                            |             |
| `provider`          | `String!`                                                                            |             |
| `resourceOverrides` | `ResourceOverrideInput` · [ResourceOverrideInput](/api/inputs#resourceoverrideinput) |             |

### DeployCompositeTemplateInput [#deploycompositetemplateinput]

| Field                        | Type                                                                                 | Description                                                                                                                 |
| ---------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------- |
| `templateId`                 | `String!`                                                                            |                                                                                                                             |
| `projectId`                  | `ID!`                                                                                |                                                                                                                             |
| `primaryServiceId`           | `ID`                                                                                 | Existing workspace service to reuse as the primary composite service.                                                       |
| `mode`                       | `String!`                                                                            | 'fullstack': all components in one lease/provider. 'custom': each component targeted individually via componentTargets.     |
| `provider`                   | `String`                                                                             | Provider for fullstack mode ('the standard compute tier' or 'the confidential compute (TEE) tier'). Ignored in custom mode. |
| `componentTargets`           | `[ComponentTargetInput!]` · [ComponentTargetInput](/api/inputs#componenttargetinput) | Per-component provider assignments for custom mode.                                                                         |
| `enabledComponentIds`        | `[String!]`                                                                          | Which components to deploy (omit to deploy all). Required components are validated.                                         |
| `componentFallbackOverrides` | `JSON`                                                                               | Override fallback values for disabled components (JSON: \{ componentId: \{ field: value } }).                               |
| `serviceName`                | `String`                                                                             |                                                                                                                             |
| `envOverrides`               | `[EnvOverrideInput!]` · [EnvOverrideInput](/api/inputs#envoverrideinput)             |                                                                                                                             |
| `resourceOverrides`          | `ResourceOverrideInput` · [ResourceOverrideInput](/api/inputs#resourceoverrideinput) |                                                                                                                             |
| `policy`                     | `DeploymentPolicyInput` · [DeploymentPolicyInput](/api/inputs#deploymentpolicyinput) |                                                                                                                             |

## Mutations [#mutations]

### CreateProjectDataInput [#createprojectdatainput]

| Field  | Type      | Description |
| ------ | --------- | ----------- |
| `name` | `String!` |             |

### UpdateProjectDataInput [#updateprojectdatainput]

| Field  | Type     | Description |
| ------ | -------- | ----------- |
| `name` | `String` |             |

## Github deploy (phase: github deploy, 2026-04-20) [#github-deploy-phase-github-deploy-2026-04-20]

### CreateGithubServiceEnvVarInput [#creategithubserviceenvvarinput]

| Field    | Type      | Description |
| -------- | --------- | ----------- |
| `key`    | `String!` |             |
| `value`  | `String!` |             |
| `secret` | `Boolean` |             |

### CreateGithubServiceInput [#creategithubserviceinput]

| Field            | Type                                                                                                               | Description                                                                    |
| ---------------- | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
| `projectId`      | `ID!`                                                                                                              |                                                                                |
| `idempotencyKey` | `String`                                                                                                           | SHA-256 request digest used to make create/dispatch retries idempotent.        |
| `installationId` | `ID!`                                                                                                              | Local id of the GithubInstallation row (NOT the GitHub-side installation\_id). |
| `owner`          | `String!`                                                                                                          |                                                                                |
| `repo`           | `String!`                                                                                                          |                                                                                |
| `branch`         | `String`                                                                                                           | Defaults to the repo's default branch when omitted.                            |
| `rootDirectory`  | `String`                                                                                                           | Monorepo subdir (defaults to '.').                                             |
| `buildCommand`   | `String`                                                                                                           |                                                                                |
| `startCommand`   | `String`                                                                                                           |                                                                                |
| `name`           | `String`                                                                                                           | Display name; defaults to repo name.                                           |
| `envVars`        | `[CreateGithubServiceEnvVarInput!]` · [CreateGithubServiceEnvVarInput](/api/inputs#creategithubserviceenvvarinput) |                                                                                |

### ConnectGithubRepoInput [#connectgithubrepoinput]

Connect an existing (empty, github-flavor) Service to a GitHub repo. Used
by the in-panel Source-tab picker: the Service row is created first by
the catalog flow (createService), then connected here. This kicks off
the first BuildJob and spawns the K8s builder. The compute provider is
NOT chosen here: the build callback auto-deploys via the existing
Service compute config the same way the Deploy button would.

| Field            | Type      | Description |
| ---------------- | --------- | ----------- |
| `serviceId`      | `ID!`     |             |
| `installationId` | `ID!`     |             |
| `owner`          | `String!` |             |
| `repo`           | `String!` |             |
| `branch`         | `String`  |             |
| `rootDirectory`  | `String`  |             |
| `buildCommand`   | `String`  |             |
| `startCommand`   | `String`  |             |
