Once you have created at least one vertex collection and at least one edge collection, you can create a graph using one of the methods described in this page.
You can also create an example graph based on Macrometa's pre-loaded examples, which include all required datasets. You do not need to create any collections for those. For more information about example graphs, refer to Example Graphs.
- Web Console
- REST API
Follow these instructions to create a new graph using the GDN console web UI.
- Log in to your Macrometa account.
- Click Graphs.
- Click New Graph. At this point, you have two options:
- Create an example graph.
- Create a graph based on your vertex and edge collections.
To create an example graph:
Next to the example graph you want to make, click Create.
Macrometa creates the named graph and the collections with vertex and edge data that the graph is based on. For more information about example graphs, refer to Example Graphs.
To create a graph based on your collections:
- In Name, enter the graph name.
- Click the Edge Definitions field, and then select the edge collection that you want the graph to use.
- Click the From Collections field, and then select the document collection that you want the graph to use for start relations of the edge definitions. You can add multiple collections in this manner.
- Click the To Collections field, and then select the document collection that you want the graph to use for end relations of the edge definitions. You can add multiple collections in this manner.
- (Optional) If you have a collection of vertices that do not connect to other vertices, sometimes called orphan vertices, then click the Vertex Collections field, then select the collection. You can add multiple collections in this manner.
- (Optional) To add another collection of edge definitions to your graph, click the plus icon. Another set of relationship fields appears, which you can populate like the previous set.
- When you have added all the collections to your graph, click Create.
Use our interactive API Reference with code generation in 18 programming languages to [Create a Graph](Link to API command).
Use the gdnsl graph create CLI command to create a new named graph.