Class JsonContentBehavioursTrait

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:

traits:
- type: json_content
schema:
vertex: Schema
property: name
edge: usesSchema
fields:
- name: jsonData
type: type
- name: profile
- type: json_content_behaviours

Ref BehavioursTrait for details about how Behaviours works.

Hierarchy

Constructors

Properties

Trait instance configuration.

_global: boolean = false

Whether this is a global (not bound to any specific schema item) trait instance.

_jsonContentBehaviourConfig: undefined | JsonContentTraitConfig

JSON Content Trait configuration.

_type?: "json_content_behaviours"

Trait type.

accessControl: AccessControl
behaviours: BehaviourBase<string, KosmosConfig<string>, InstanceConfig<string>>[]
behavioursInstanceManager: BehavioursInstanceManager
behavioursSchemaManager: BehavioursSchemaManager
graphQlSchemaManager: GraphQLSchemaManager
jsonContentSchemaManager: JsonContentSchemaManager
schemaManager: SchemaManager

Accessors

Methods

  • Returns the enable/disable mutation type.

    Parameters

    • vertexLabel: string
    • type: "enable" | "disable"

    Returns string

  • Returns the schema Behaviours list query name.

    Parameters

    • vertexLabel: string
    • type: "list"

    Returns string

  • This method is triggered when a trait callback has been activated

    Type Parameters

    • RT = any

    • Payload = any

    Parameters

    • callbackName: string

      This is the name of the callback function to call.

    • datasourceWrapper: DataSourceWrapper

      References to the Graph Hanlder

    • data: TraitDataObject<RT, Payload, Promise<any>>

      Request data passed along as part of the request.

    Returns Promise<RT>

Generated using TypeDoc