ImmutableTrait Constructor
Protected Optional _configTrait instance configuration.
Protected Readonly _dataProtected _globalWhether this is a global (not bound to any specific schema item) trait instance.
Protected Readonly _graphqlProtected Optional _typeTrait type.
Takes the stored data and updated data and checks whether any changed properties are immutable Throws an error if an immutable property is changed
dataSourceWrapper Object
requires context for user permissions
Contains variables used in query
Attaches Trait callbacks to schema item hooks.
Makes this Trait instance global.
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.
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 Immutable Trait is used to Stop properties of a schema vertex from being updated after being created. A check is made at the preUpdate Stage.
Usage: