Class GraphHandler

The GraphHandler Class implements the Handler Class to provide the Graph backend data source handler. The graph connector is responsible for any reading or writing of data to the graph db.

Hierarchy

Constructors

Properties

_graphConnector: any
_handleDisconnectFromVertices: any

Param

The context of the user who the call is being made on behalf of.

Param

Param

Returns

Promise

Methods

  • Handle a request to connect a (probably newly created) vertex to additional existing vertices. This is used for example when creating an entity with required connections.

    Parameters

    • context: any
    • access: any
    • type: any
    • vertexUuid: any
    • connectToVertices: any
    • traitData: TraitDataObject<unknown, Record<string, any>, Promise<any>>
    • dataSourceWrapper: DataSourceWrapper
    • Optional validatePrimary: boolean

      If this is set to false, access control validation is skipped for the primary vertex (the one to which the new connections are to be added). This may be useful if access to create connections is dependent on rules that expect the connections to already exist - in other words, when the primary vertex has just been created. The other end of the connection is still access-checked as normal.

    Returns Promise<void>

  • Parameters

    • context: KosmosUserContext<object>
    • access: AccessControl
    • edgeName: any
    • src_uuid: any
    • src_label: any
    • dest_uuid: any
    • dest_label: any
    • properties: any
    • unique: any
    • Optional validate: boolean
    • Optional extraInfo: {
          destVertex: any;
          srcVertex: any;
      }
      • destVertex: any
      • srcVertex: any

    Returns Promise<void>

  • This function is used to retrieve a list Vertices by their uuids.

    Parameters

    • context: KosmosUserContext<object>

      The context of the user who the call is being made on behalf of.

    • uuids: readonly string[]

      The uuids of the entities

    • Optional type: string

      The type of the entity being requested (optional)

    Returns Promise<any[]>

  • Parameters

    • context: KosmosUserContext<object>
    • module: string
    • key: string
    • Optional fetchFunction: ((...args: any[]) => Promise<any>)
        • (...args: any[]): Promise<any>
        • Parameters

          • Rest ...args: any[]

          Returns Promise<any>

    Returns Promise<any>

  • This function is used to get the destination vertex that the source vertex is pointing to via the defined edge/relationship.

    Returns

    Returns the vertex conencted by the source vertex and edge.

    Parameters

    • vertex: string

      The label of the vertex.

    • edge: string

      The label of the edge.

    Returns string

  • This function is used to get the destination vertex that the source vertex is pointing FROM via the defined edge/relationship, this is the inverse to getDestinationVertexEdge

    Returns

    Returns the vertex conencted by the source vertex and edge.

    Parameters

    • sourceVertex: string

      The label of the source vertex.

    • destVertex: string

      The label of the destination vertex.

    • edgeName: string

      The label of the edge.

    • Optional connection: boolean

      This a boolean 1:1 is flase 0:n true

    Returns string

  • This function is used to get the destination vertex that the source vertex is pointing FROM via the defined edge/relationship, this is used when getting a connection 0:N rather than a 1:1

    Returns

    Returns the vertex conencted by the source vertex and edge.

    Parameters

    • destVertex: string

      The label of the vertex.

    • edgeName: string

      The label of the edge.

    Returns string

  • Deprecated

    Use ZeroToManyRelationVertexLoader service

    Parameters

    • context: KosmosUserContext<object>
    • sourceUUID: any
    • sourceType: any
    • edgeType: any
    • offset: any
    • limit: undefined | number
    • destinationType: any
    • bypassAccess: undefined | boolean
    • filter: any
    • Optional orderByProperty: string
    • Optional orderBy: FilterOrderDirection
    • Optional edgeProperties: {
          name: string;
          value: any;
      }[]

    Returns Promise<void>

Generated using TypeDoc