Skip to main content

PlayerWasmPolicy

One player-compute policy row (06 §3): developer-set per-player/cohort clamps evaluated most-specific-wins (user > grid > tier > app_default), every knob additionally clamped by the app's studio policy at runtime. Management is authoritative in P2; rows replica-sync to the game runtime.

type PlayerWasmPolicy {
policyId: String!
appId: BigInt!
scope: String!
scopeRef: BigInt
enabled: Boolean!
maxModulesPerGrid: Int!
maxModulesTotal: Int!
maxTickHz: Float!
fuelPerTick: BigInt!
fuelPerInvoke: BigInt!
maxMemoryMb: Int!
maxRunMs: Int!
maxDbOpsPerTick: Int!
maxEgressMsgsPerMin: Int!
maxEgressBytesPerMin: BigInt!
unitsPerHour: BigInt
unitsPerDay: BigInt
maxCompilesPerHour: Int!
maxContainerCreatesDay: Int!
clientFuelPerDispatch: BigInt!
}

Fields

PlayerWasmPolicy.policyId ● String! non-null scalar

Policy row UUID.

PlayerWasmPolicy.appId ● BigInt! non-null scalar

The app.

PlayerWasmPolicy.scope ● String! non-null scalar

'app_default', 'tier', 'grid', or 'user'.

PlayerWasmPolicy.scopeRef ● BigInt scalar

Tier/grid/user id; null for app_default.

PlayerWasmPolicy.enabled ● Boolean! non-null scalar

Whether this row is applied.

PlayerWasmPolicy.maxModulesPerGrid ● Int! non-null scalar

Max player modules per grid.

PlayerWasmPolicy.maxModulesTotal ● Int! non-null scalar

Max player modules across all grids one player owns.

PlayerWasmPolicy.maxTickHz ● Float! non-null scalar

Max tick rate in Hz.

PlayerWasmPolicy.fuelPerTick ● BigInt! non-null scalar

Fuel budget per tick.

PlayerWasmPolicy.fuelPerInvoke ● BigInt! non-null scalar

Fuel budget per invoke/event.

PlayerWasmPolicy.maxMemoryMb ● Int! non-null scalar

Sandbox memory ceiling (MiB).

PlayerWasmPolicy.maxRunMs ● Int! non-null scalar

Watchdog wall-clock ceiling (ms).

PlayerWasmPolicy.maxDbOpsPerTick ● Int! non-null scalar

Host data-API ops per tick.

PlayerWasmPolicy.maxEgressMsgsPerMin ● Int! non-null scalar

Module replication messages per minute.

PlayerWasmPolicy.maxEgressBytesPerMin ● BigInt! non-null scalar

Module replication bytes per minute.

PlayerWasmPolicy.unitsPerHour ● BigInt scalar

Hourly compute-unit quota (PLAYER_QUOTA_EXHAUSTED pause); null = uncapped.

PlayerWasmPolicy.unitsPerDay ● BigInt scalar

Daily compute-unit quota; null = uncapped.

PlayerWasmPolicy.maxCompilesPerHour ● Int! non-null scalar

Deploys (compiles) allowed per player per hour.

PlayerWasmPolicy.maxContainerCreatesDay ● Int! non-null scalar

Player model containers created per player per day.

PlayerWasmPolicy.clientFuelPerDispatch ● BigInt! non-null scalar

Client-target fuel budget per browser dispatch (04 §3).

Returned By

playerWasmPolicies query ● setPlayerWasmPolicy mutation