The open graph is schema-free, requiring no explicit schema definitions before data insertion. You can directly insert nodes and edges into the graph, and their labels and properties are created on the fly. This offers maximum flexibility for early-stage data exploration.
In an open graph,
Open graphs do not require explicit definitions of labels and properties; they are automatically created as you insert nodes and edges into the graph.
Create an open graph g1:
GQLCREATE GRAPH g1
The optional ANY keyword can be used to explicitly indicate an open graph:
GQLCREATE GRAPH g1 ANY
Show labels in the current graph:
GQLSHOW LABELS SHOW NODE LABELS SHOW EDGE LABELS
To inspect a single label:
GQLDESCRIBE LABEL myLabel -- DESC is a shorthand for DESCRIBE DESC LABEL myLabel
Each label provides the following essential metadata:
| Field | Description |
|---|---|
label | The name of the label. |
type | The type of the label, NODE or EDGE. |