Protected Optional _configTrait instance configuration.
Protected _globalWhether this is a global (not bound to any specific schema item) trait instance.
Protected Optional _typeTrait type.
Protected Readonly accessProtected Readonly dataProtected Readonly graphqlProtected Readonly lockStatic hookedCreates locking configs and attaches entities to created configs. If config has already created but entity is not attached - adds required edge
Resolver for mutation create{Entity}LockingConfigs
Resolver for query {Entity}LockingConfigs
Attaches Trait callbacks to schema item hooks.
Loads entities declared in config using gremlin queries
Loads all existed configs and finds entities without attached configs
Fills following properties of vertices[i]:
vertices[i].connectionRequired - entities without attached configvertices[i].config - existed config for this group of entitiesCreates lock for entity
Makes this Trait instance global.
Rest ...__namedParameters: [traitData: TraitDataObject<unknown, Record<string, any>, Promise<any>>, item: StoredKosmosItem, datasourceWrapper: DataSourceWrapper, context: KosmosUserContext<object>]Adds lock info properties to reply
Rest ...__namedParameters: [traitData: TraitDataObject<unknown, Record<string, any>, Promise<any>>, data: object, datasourceWrapper: DataSourceWrapper, context: KosmosUserContext<object>]This method is triggered when a trait callback has been activated
This is the name of the callback function to call.
References to the Graph Hanlder
Request data passed along as part of the request.
Configuration setter.
The new configuration.
Breaks lock for entity
Resolver for mutation update{Entity}LockingConfigs
Helper method for wrapping legacy Kosmos traits callbacks.
TODO: Remove this method once all Traits are converted.
Optional callbackName: stringOptional callback name; passing this parameter will additionally wrap the callback into legacy process().
Static traitGenerated using TypeDoc
The Locking Trait is used to lock entity update mutations. Lock allows to handle that this document will not be edited by 2 users Lock can be acquired by mutation Lock can be broken by mutation and after updating entity
This trait adds new properties to query resolver:
To prolong lock after update mutation there is
keepTheLockflag in arguments ACL for breaking the lock by another user can be defined via policies: Entity:ForceBreakLockUsage: