Protected Optional _configTrait instance configuration.
Protected _globalWhether this is a global (not bound to any specific schema item) trait instance.
Private _jsonJSON Content Trait configuration.
Protected Optional _typeTrait type.
Protected Readonly accessProtected Readonly behavioursProtected Readonly behavioursProtected Readonly behavioursProtected Readonly graphProtected Readonly jsonProtected Readonly schemaProtected jsonReturns related JsonContentTrait configuration.
Private behaviourPrivate getPrivate getReturns name of GraphQL type corresponding JsonContentBehavioursListResponseItem TS type.
The schema item label.
Private getReturns callback for the resolver callback to disable behaviour for a given JSON schema.
The GraphQL resolver callback instance.
The schema item.
Private getReturns callback for the resolver callback to enable behaviour for a given JSON schema.
The GraphQL resolver callback instance.
The schema item.
Private getReturns the list query resolver for a given schema item.
The GraphQL resolver callback instance.
The schema item.
Private getPrivate getProtected getRetrieves schema name by entity ID.
The user context
The entity ID.
Attaches Trait callbacks to schema item hooks.
Makes this Trait instance global.
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.
Private wrapBehaviour resolver wrapper.
Determines Schema type for given entity, retrieves and verifies behaviour instance configuration, then executes the Behaviour resolver, passing in runtime behaviour instance configuration.
Rest ...__namedParameters: [schemaItem: SchemaItem<SchemaItemType>, behaviourName: string, behaviourResolver: BehaviourGraphQlResolver<InstanceConfig<string>, any, Record<string, any>, Promise<any>, SchemaItemType>]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 Json Content Behaviours Trait.
Attaches all existing Behaviours to a given entity type, allows listing, enabling and disabling Behaviours for specific Schema items.
Requires
jsonContent(JsonContentTrait) trait to be applied first.Usage:
Ref BehavioursTrait for details about how Behaviours works.