Class BookmarkBehaviour

The base Behaviour class.

Mermaid

Behaviour life cycle / configuration flow

%%{init:{"theme":"dark"}}%% sequenceDiagram actor User participant IoC participant Kosmos config participant GraphQL participant BehaviourTrait participant Behaviour participant BehaviourInstanceManager IoC->>Kosmos config: Reads config Kosmos config->>IoC: List of available Behaviours and their Kosmos configs loop All available behaviours Note over IoC,Behaviour: Configurations are tenant and content type agnostic IoC->>Behaviour: Instantiate and pass in KosmosConfig end loop Handling requests User->>GraphQL: GraphQL query calling Behaviour GraphQL->>BehaviourTrait: Calls Behaviour wrapper BehaviourTrait->>BehaviourInstanceManager: Retrieve Behaviour instance config opt Missing config/instance BehaviourInstanceManager->>BehaviourTrait: Error BehaviourTrait->>GraphQL: Error GraphQL->>User: Error end BehaviourInstanceManager->>BehaviourTrait: Behaviour instance config BehaviourTrait->>Behaviour: Executes resolver, passing in context, args and instance config Behaviour->>BehaviourTrait: Response BehaviourTrait->>GraphQL: Response GraphQL->>User: Response end
%%{init:{"theme":"default"}}%% sequenceDiagram actor User participant IoC participant Kosmos config participant GraphQL participant BehaviourTrait participant Behaviour participant BehaviourInstanceManager IoC->>Kosmos config: Reads config Kosmos config->>IoC: List of available Behaviours and their Kosmos configs loop All available behaviours Note over IoC,Behaviour: Configurations are tenant and content type agnostic IoC->>Behaviour: Instantiate and pass in KosmosConfig end loop Handling requests User->>GraphQL: GraphQL query calling Behaviour GraphQL->>BehaviourTrait: Calls Behaviour wrapper BehaviourTrait->>BehaviourInstanceManager: Retrieve Behaviour instance config opt Missing config/instance BehaviourInstanceManager->>BehaviourTrait: Error BehaviourTrait->>GraphQL: Error GraphQL->>User: Error end BehaviourInstanceManager->>BehaviourTrait: Behaviour instance config BehaviourTrait->>Behaviour: Executes resolver, passing in context, args and instance config Behaviour->>BehaviourTrait: Response BehaviourTrait->>GraphQL: Response GraphQL->>User: Response end
sequenceDiagram
    actor User
    participant IoC
    participant Kosmos config
    participant GraphQL
    participant BehaviourTrait
    participant Behaviour
    participant BehaviourInstanceManager
    IoC->>Kosmos config: Reads config
    Kosmos config->>IoC: List of available Behaviours and their Kosmos configs
    loop All available behaviours
        Note over IoC,Behaviour: Configurations are tenant and content type agnostic
        IoC->>Behaviour: Instantiate and pass in KosmosConfig
    end
    loop Handling requests
        User->>GraphQL: GraphQL query calling Behaviour
        GraphQL->>BehaviourTrait: Calls Behaviour wrapper
        BehaviourTrait->>BehaviourInstanceManager: Retrieve Behaviour instance config
        opt Missing config/instance
            BehaviourInstanceManager->>BehaviourTrait: Error
            BehaviourTrait->>GraphQL: Error
            GraphQL->>User: Error
        end
        BehaviourInstanceManager->>BehaviourTrait: Behaviour instance config
        BehaviourTrait->>Behaviour: Executes resolver, passing in context, args and instance config
        Behaviour->>BehaviourTrait: Response
        BehaviourTrait->>GraphQL: Response
        GraphQL->>User: Response
    end

Hierarchy

Constructors

Properties

accessControl: AccessControl
dataSourceWrapper: DataSourceWrapper
graphHandler: GraphHandler
graphQlSchemaManager: GraphQLSchemaManager

Accessors

Methods

  • Parameters

    • label: string

    Returns {
        name: string;
        schema: string;
        types: any[];
    }

    • name: string
    • schema: string
    • types: any[]

Generated using TypeDoc