GmAutomationTrigger
An event subscription that fires an automation in reaction to model activity or a complete app-scoped active-player-count transition (matched in the API server, not a DB trigger).
type GmAutomationTrigger {
triggerId: String!
appId: BigInt!
automationId: String!
onEvent: String!
functionName: String
containerTypeName: String
propertyKey: String
writeSource: String!
debounceMs: Int!
lastMatchedAt: DateTime
matchCount24h: Int!
warnings: [String!]!
}
Fields
GmAutomationTrigger.triggerId ● String! non-null scalar
Unique trigger id (UUID).
GmAutomationTrigger.appId ● BigInt! non-null scalar
The app (tenant).
GmAutomationTrigger.automationId ● String! non-null scalar
The automation this trigger fires.
GmAutomationTrigger.onEvent ● String! non-null scalar
Observed event: function_invoked | property_changed | container_created | player_count_changed | player_left | player_joined.
GmAutomationTrigger.functionName ● String scalar
Filter: only this function name. Always null for player_count_changed, player_left and player_joined.
GmAutomationTrigger.containerTypeName ● String scalar
Filter: only this container type. Always null for player_count_changed, player_left and player_joined.
GmAutomationTrigger.propertyKey ● String scalar
Filter: only this property key. Always null for player_count_changed, player_left and player_joined.
GmAutomationTrigger.writeSource ● String! non-null scalar
property_changed only: which writes are observed — "direct" (gameModelSetProperty), "function" (a mutation applied inside an invoke, automation run, or timer fire), or "any". Always "any" for other events, which ignore it.
GmAutomationTrigger.debounceMs ● Int! non-null scalar
Debounce window in ms. player_count_changed coalesces on the trailing edge; other model events use their existing leading-edge behavior.
GmAutomationTrigger.lastMatchedAt ● DateTime scalar
When this trigger last matched an event and dispatched a run, or null if it has never matched. A trigger that stays null while its event is happening is almost always a filter that cannot match — see warnings.
GmAutomationTrigger.matchCount24h ● Int! non-null scalar
Runs this trigger dispatched in the last 24 hours, including runs a guard then dropped. Fires suppressed by debounceMs never reach a run and are not counted.
GmAutomationTrigger.warnings ● [String!]! non-null scalar
Authoring problems detected for this trigger, empty when healthy. Reported rather than silently never firing.
Returned By
gameModelAutomationTriggers query ● gameModelUpsertAutomationTrigger mutation