Skip to main content

UpsertFunctionInput

Create or update a studio-defined function. Upsert key is (app, name).

input UpsertFunctionInput {
appId: BigInt!
name: String!
containerTypeName: String
description: String
returnType: String
parameters: [FunctionParamInput!]
mutations: [FunctionMutationInput!]
returnExpression: String
invokeScope: String
invokePolicyJson: String
autonomousInvocable: Boolean
notifications: [FunctionNotificationInput!]
permissionEffects: [FunctionPermissionEffectInput!]
}

Fields

UpsertFunctionInput.appId ● BigInt! non-null scalar

The app (tenant) that owns the function.

UpsertFunctionInput.name ● String! non-null scalar

Function name (unique per app). Used to invoke it.

UpsertFunctionInput.containerTypeName ● String scalar

Optional container type to bind the function to (omit for a global function).

UpsertFunctionInput.description ● String scalar

Optional description of the function.

UpsertFunctionInput.returnType ● String scalar

Optional declared return value type.

UpsertFunctionInput.parameters ● [FunctionParamInput!] list input

Typed parameters the function accepts.

UpsertFunctionInput.mutations ● [FunctionMutationInput!] list input

The property writes the function performs (applied atomically when invoked).

UpsertFunctionInput.returnExpression ● String scalar

Optional expression whose value becomes the invoke result.

UpsertFunctionInput.invokeScope ● String scalar

player | server | internal

UpsertFunctionInput.invokePolicyJson ● String scalar

JSON-encoded invoke-policy rule tree (authority requirements).

UpsertFunctionInput.autonomousInvocable ● Boolean scalar

Opt-in: allow an autonomous process (automation/NPC) to use this function as an entry point. Defaults to false. Players are unaffected; this only enables server-driven invocation.

UpsertFunctionInput.notifications ● [FunctionNotificationInput!] list input

Declarative realtime notifications the function emits via Buddy AFTER it commits. Players and automations (NPCs) emit identically; fenced by delivery mode.

UpsertFunctionInput.permissionEffects ● [FunctionPermissionEffectInput!] list input

Declarative grid-permission effects (grant/revoke runtime grid ACL rows) applied atomically with the function's mutations. Max 4 per function.

Member Of

gameModelUpsertFunction mutation