Alternate Futures
API (GraphQL)

Input types

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 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.

EnvVarInput

FieldTypeDescription
keyString!
valueString!
secretBoolean

Functions

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.

FieldTypeDescription
nameString!
projectIdID!
typeServiceType · ServiceType
templateIdString
flavorStringCatalog flow discriminator. One of 'docker' | 'server' | 'function' | 'template'. Validated server-side; rejected if any other value. Immutable post-creation.
dockerImageString
containerPortInt

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.

FieldTypeDescription
dockerImageString
containerPortInt
volumesJSONPersistent 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.
healthProbeJSONOptional 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).
failoverPolicyJSONOptional 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

LoginWithPersonalAccessTokenDataInput

Input for exchanging a Personal Access Token for an access token

FieldTypeDescription
personalAccessTokenString!
projectIdID

Attestation registry (org-owned allowlist + verified identities)

AddAttestationMeasurementInput

FieldTypeDescription
measurementString!Hex sha256 of the blessed build's app-compose.json.
labelString!

RegisterAttestedIdentityInput

FieldTypeDescription
pubkeyString!Hex Ed25519 public key from the server's GET /identity.
quoteString!Raw TDX quote (hex) binding the pubkey (report_data = sha256(pubkey)).
appIdStringOptional the confidential compute (TEE) tier CVM app id, used to link the identity to an AF service.

Feedback & bug reports

SubmitFeedbackInput

FieldTypeDescription
titleString!
categoryFeedbackCategory! · FeedbackCategory
locationString
descriptionString!

Agent chat system

CreateAgentInput

FieldTypeDescription
nameString!
slugString!
descriptionString
systemPromptString
modelString
functionIdID

CreateChatInput

FieldTypeDescription
agentIdID!
titleString

SendMessageInput

FieldTypeDescription
chatIdID!
contentString!

Observability / APM

TraceQueryInput

FieldTypeDescription
projectIdID!
startTimeDate!
endTimeDate!
serviceNameString
spanNameString
minDurationMsFloat
maxDurationMsFloat
statusCodeString
traceIdString
limitInt
offsetInt

MetricQueryInput

FieldTypeDescription
projectIdID!
startTimeDate!
endTimeDate!
metricNameString
aggregationMetricAggregation · MetricAggregation
intervalString
limitInt

LogQueryInput

FieldTypeDescription
projectIdID!
startTimeDate!
endTimeDate!
severityTextString
minSeverityNumberInt
searchString
traceIdString
limitInt
offsetInt

UpdateObservabilitySettingsInput

FieldTypeDescription
tracesEnabledBoolean
metricsEnabledBoolean
logsEnabledBoolean
traceRetentionInt
metricRetentionInt
logRetentionInt
sampleRateFloat
maxBytesPerHourString

Deployment policy (budget, GPU, runtime constraints)

DeploymentPolicyInput

FieldTypeDescription
acceptableGpuModels[String!]
gpuUnitsInt
gpuVendorString
maxBudgetUsdFloat
maxMonthlyUsdFloat
runtimeMinutesInt

Templates

EnvOverrideInput

FieldTypeDescription
keyString!
valueString!

GpuOverrideInput

FieldTypeDescription
unitsInt!
vendorString!
modelString

ResourceOverrideInput

FieldTypeDescription
cpuFloat
memoryString
storageString
gpuGpuOverrideInput · GpuOverrideInput

DeployFromTemplateInput

FieldTypeDescription
templateIdString!
projectIdID!
serviceNameString
envOverrides[EnvOverrideInput!] · EnvOverrideInput
resourceOverridesResourceOverrideInput · ResourceOverrideInput
policyDeploymentPolicyInput · DeploymentPolicyInput

ComponentTargetInput

FieldTypeDescription
componentIdString!
providerString!
resourceOverridesResourceOverrideInput · ResourceOverrideInput

DeployCompositeTemplateInput

FieldTypeDescription
templateIdString!
projectIdID!
primaryServiceIdIDExisting workspace service to reuse as the primary composite service.
modeString!'fullstack': all components in one lease/provider. 'custom': each component targeted individually via componentTargets.
providerStringProvider for fullstack mode ('the standard compute tier' or 'the confidential compute (TEE) tier'). Ignored in custom mode.
componentTargets[ComponentTargetInput!] · ComponentTargetInputPer-component provider assignments for custom mode.
enabledComponentIds[String!]Which components to deploy (omit to deploy all). Required components are validated.
componentFallbackOverridesJSONOverride fallback values for disabled components (JSON: { componentId: { field: value } }).
serviceNameString
envOverrides[EnvOverrideInput!] · EnvOverrideInput
resourceOverridesResourceOverrideInput · ResourceOverrideInput
policyDeploymentPolicyInput · DeploymentPolicyInput

Mutations

CreateProjectDataInput

FieldTypeDescription
nameString!

UpdateProjectDataInput

FieldTypeDescription
nameString

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

CreateGithubServiceEnvVarInput

FieldTypeDescription
keyString!
valueString!
secretBoolean

CreateGithubServiceInput

FieldTypeDescription
projectIdID!
idempotencyKeyStringSHA-256 request digest used to make create/dispatch retries idempotent.
installationIdID!Local id of the GithubInstallation row (NOT the GitHub-side installation_id).
ownerString!
repoString!
branchStringDefaults to the repo's default branch when omitted.
rootDirectoryStringMonorepo subdir (defaults to '.').
buildCommandString
startCommandString
nameStringDisplay name; defaults to repo name.
envVars[CreateGithubServiceEnvVarInput!] · CreateGithubServiceEnvVarInput

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.

FieldTypeDescription
serviceIdID!
installationIdID!
ownerString!
repoString!
branchString
rootDirectoryString
buildCommandString
startCommandString

On this page