gameModelEnsureContainer
Atomically get-or-create a container by an opaque bindingKey, unique per (appId, typeName, sessionId). Concurrent ensures with the same key all return the SAME containerId and exactly one response has created: true — no client-side leader election or list-then-create coordination is needed for shared world objects. When the row already exists this behaves like a read (creation-only fields are ignored and the type's instantiableBy rule is NOT enforced); when it does not exist, creation is authorized exactly like gameModelCreateContainer (instantiableBy + owner rules) AND by the type's bindPolicy, so a caller who may not instantiate the type, or may not claim keys for it, errors only in the not-exists case. bindingKey is client-supplied, so on a member- or owner-instantiable type ANY entitled player may create the keyed row and becomes its owner — which inverts every owner_of_self invoke policy on that type. Set the container type's bindPolicy (e.g. {"type":"is_host"}), or use an admin-instantiable type, for any object more than one player shares. The prefix seed: is reserved for gameModelSeed (v1.93.0); a non-admin ensure cannot claim it. Requires a valid token.
gameModelEnsureContainer(
input: EnsureContainerInput!
): GmEnsureContainerResult!
Arguments
gameModelEnsureContainer.input ● EnsureContainerInput! non-null input
The app, optional session, container type, the binding key, and the display name / owner / metadata / initial properties applied only if this call creates the row.
Type
GmEnsureContainerResult object
Result of gameModelEnsureContainer: the resolved container plus whether this call inserted it.