Skip to main content

AppRuntimeState

The shared-environment runtime gate + current billing-window usage for an app.

type AppRuntimeState {
appId: BigInt!
deploymentTarget: AppDeploymentTarget!
runtimeStatus: AppRuntimeStatus!
runtimeDenialReason: String
walletBalanceCents: BigInt!
currentHourUsageCents: BigInt!
currentDayUsageCents: BigInt!
hourlyLimitCents: BigInt
dailyLimitCents: BigInt
currentMonthUsageCents: BigInt!
monthlyLimitCents: BigInt
}

Fields​

AppRuntimeState.appId ● BigInt! non-null scalar​

App id (BigInt).

AppRuntimeState.deploymentTarget ● AppDeploymentTarget! non-null enum​

Where the app runs (none / shared / dedicated).

AppRuntimeState.runtimeStatus ● AppRuntimeStatus! non-null enum​

Current runtime gate decision (active / grace / denied / suspended).

AppRuntimeState.runtimeDenialReason ● String scalar​

insufficient_funds | spend_cap | subscription_lapsed | payment_method_required when not active. payment_method_required: the free-tier card requirement (freeTierCardRequirement) applies to the organization, and it has no saved card and no exemption. Historical rows may carry free_allowance, which the gate no longer produces.

AppRuntimeState.walletBalanceCents ● BigInt! non-null scalar​

Owning org wallet balance, in cents.

AppRuntimeState.currentHourUsageCents ● BigInt! non-null scalar​

Spend so far in the current hour window, in cents.

AppRuntimeState.currentDayUsageCents ● BigInt! non-null scalar​

Spend so far in the current day window, in cents.

AppRuntimeState.hourlyLimitCents ● BigInt scalar​

Per-app hourly spend cap in cents (set via setAppSpendCaps). Null = no cap.

AppRuntimeState.dailyLimitCents ● BigInt scalar​

Per-app daily spend cap in cents (set via setAppSpendCaps). Null = no cap.

AppRuntimeState.currentMonthUsageCents ● BigInt! non-null scalar​

Spend so far in the current calendar month (UTC), in cents.

AppRuntimeState.monthlyLimitCents ● BigInt scalar​

Per-app monthly budget in cents (set via setAppBudget). Null = no budget. The app is refused with spend_cap once this month's spend reaches it.

Returned By​

appRuntimeState query ● setAppSpendCaps mutation