ALTER CURRENT GRAPH TYPE

Generic Description

Replace or incrementally change the type definition bound to the current graph.

Simple example:

ALTER CURRENT GRAPH TYPE ADD { (:Movie { title STRING }) }

Consumer-Level Explanation

Use this when you need to tell Nexyron what kinds of nodes and edges the current graph is expected to contain, or when that graph shape needs to evolve over time.

Conceptual Explanation

ALTER CURRENT GRAPH TYPE is not a data-mutation clause. It changes the graph-type contract for the currently bound graph. The parser supports three operational modes:

This matters when teams want explicit graph-shape governance rather than relying only on emergent labels and properties.

More Detailed Explanation

The important conceptual distinction is between changing graph data and changing the graph's declared type shape.

Examples of where this matters:

The parser maps SET to a replace-style graph-type creation for the current graph, while ADD and DROP become explicit graph-type alterations.

Advanced Example

This example keeps ALTER CURRENT GRAPH TYPE as the focal statement while showing the kind of system where graph, time, document-style metadata, and vector features coexist around the same graph contract.

ALTER CURRENT GRAPH TYPE ADD {
  (:Incident {
    title STRING NOT NULL,
    severity STRING,
    metadata MAP,
    embedding LIST
  }),
  (:Service)-[:IMPACTS { ts DATETIME, payload MAP }]->(:Incident)
}

After a change like this, teams can issue queries that combine:

Real Use Cases

Real Limitations And Tradeoffs