This function is used to load a json schema from the schema directory
Protected Optional _graphProtected Readonly _namedPrivate Optional _onPrivate Optional _queriesProtected Readonly _schemaProtected Optional _schemaProtected Readonly _schemaProtected Optional _schemaProtected _schemaProtected Readonly _schemasProtected Readonly _traitProtected Optional _unionPrivate Optional _unionsProtected Readonly _vPrivate alterAllow traits to alter the union schema.
This is not a hook because it needs to be done before the traits are fully initialized and have tapped the hooks.
It iterates over all trait instances on all schemas, and calls traitInstance.alterUnions(type, conf, schemaManager, unions) on each trait instance that has such a method. The pseudo-hook's parameters are documented on the TraitAlterUnions generic interface in Trait.ts.
This method is used to check if a vertex property is required, this is used by the GraphConnector to check if a property is required before it can be deleted.
Whether property is required.
The name of the type
The name of the field of the entity.
Protected checkReturns vertex relationship for a given query connector.
Example of vertex relationship.
{ vertexName: "Pod", direction: "in/out", relationship: "hasParent", type: "oneToOne", required: true inverse:"", }
An own vertex name.
Direction of the edge to the vertex in/out.
Retrieves a list of static instances of all Traits being used.
Get all the definitions needed for finding the ancestors of a vertex type.
Returns an object with possible ancestor vertex types as keys, and their parent rule definition arrays as values.
Returns previously loaded schema item for a given item type.
TODO: Make this method private, expose separate methods for edge and vertex instead.
The SchemaItem object.
Item type.
throw an error if there is no such schema. Default is true.
Get the schema type for a schema name.
The schema type (e.g. 'vertex')
The schema name (e.g. 'User')
Returns the entries of all unions
This is used to find the Node relationships required for a node to be created, this is defined in the relationship as requried. see graph.json
Vertex / entity type label.
Whether to include inverse connections.
Private initializeReturns a list of schema items names.
Protected loadThis method is used to load the graph.yml file from the filesystem.
The graph.yml file contains the allowed vertices and edges/releationships that can be added to the graph. The actual definitions of each vertex are described in a seperate JSON schema file as are the edges/releationships.
Protected loadPrivate loadThis function is used to load an edge or a vertex schema from the schema directory.
The name of the schema item to process.
The type of the schema file either edge or vertex.
Protected loadProtected loadPrivate setSet the union schema.
Use this instead of just assigning the property to avoid breaking external references.
the new union schema
This method is used to validate json data against a named schema against and schema type.
Name of the schema to use for the validation.
JSON data to be validated
The type of schema Edge/schema
The action to perform.
This method is used to validate json data structure against the defined schema for the named edge.
Error if schema is not valid.
This method is used to validate json data structure against the defined schema for the named vertex.
Error if schema is not valid.
Generated using TypeDoc
SchemaManager class is responsible fo loading registered schemas and to validate data against those schemas.