WasmModule
A WASM compute module: developer-authored Rust compiled to sandboxed WASM on game-api instances. Holds metadata, the deployed version pointer, and circuit-breaker state; source lives in versions.
type WasmModule {
moduleId: String!
appId: BigInt!
name: String!
description: String
enabled: Boolean!
alwaysOn: Boolean! @deprecated
currentVersionId: String
circuitState: String!
consecutiveFailures: Int!
cooldownUntil: DateTime
breakerLatchedAt: DateTime
breakerReason: String
lastError: String
createdAt: DateTime!
updatedAt: DateTime!
}
Fields
WasmModule.moduleId ● String! non-null scalar
Unique module id (UUID).
WasmModule.appId ● BigInt! non-null scalar
The app (tenant) that owns the module.
WasmModule.name ● String! non-null scalar
Module name (unique per app); the upsert key.
WasmModule.description ● String scalar
Optional description.
WasmModule.enabled ● Boolean! non-null scalar
Whether the module may run. New modules start disabled; enable after a successful compile.
WasmModule.alwaysOn ● Boolean! deprecated non-null scalar
Retired 2026-09-01: nothing runs for an app with no player in it, so this is always false. Stop selecting it.
RETIRED. Always false. Modules run only while their app has a player present.
WasmModule.currentVersionId ● String scalar
The deployed version id (UUID). Null until first deploy.
WasmModule.circuitState ● String! non-null scalar
Circuit-breaker state: closed | open | half_open.
WasmModule.consecutiveFailures ● Int! non-null scalar
Current consecutive-failure count.
WasmModule.cooldownUntil ● DateTime scalar
When the open circuit may retry (half-open).
WasmModule.breakerLatchedAt ● DateTime scalar
When this module was stopped for exceeding a resource limit. Null when it is running normally. Unlike the circuit breaker this does not clear on its own: deploy a new version, or ask an admin to reset it.
WasmModule.breakerReason ● String scalar
What the module exceeded and what to change, when it has been stopped for a resource limit. Null when it is running normally.
WasmModule.lastError ● String scalar
The single most recent error string, overwritten by each new failure and CLEARED by the next success — so a module that fails intermittently reports null between failures. Do not read this as a health signal: use userCodeFaultSummary, which keeps every fault with its kind and blame. Kept for the "what went wrong just now" case it is genuinely good at.
WasmModule.createdAt ● DateTime! non-null scalar
When the module was created.
WasmModule.updatedAt ● DateTime! non-null scalar
When the module was last updated.
Returned By
computeDeployTemplate mutation ● computeModule query ● computeModules query ● computeResetBreaker mutation ● computeSetModuleEnabled mutation ● computeUpsertModule mutation