Manage Graph Edges
This page explains various methods for managing edges in Macrometa graphs.
Create an Edge
These instructions provide several methods of creating a new edge in an existing graph.
- Web Console
- REST API
- CLI
Follow these instructions to create a graph edge using the GDN console web UI.
Click Data > Graphs.
Click the graph that you want to create a new edge for.
Click the first vertex that you want to create an edge for. This will be the From vertex of the edge.
Click Draw edge (chain links icon).
Click the destination vertex of the edge. This will be the To vertex.
(Optional) In the Create Edge window, enter the edge _key. If you do not enter a key, then Macrometa automatically generates one for you.
In the Create Edge window, select the Collection to add the edge to.
Click Create.
A new edge appears on the canvas and a new edge record appears in the collection that you selected. You can now edit the edge to add attributes.
Use our interactive API Reference with code generation in 18 programming languages to Create an Edge.
Use the gdnsl graph edge create CLI command to create a new graph edge.
View an Edge
These instructions provide several methods of viewing a graph edge.
- Web Console
- REST API
- CLI
Follow these instructions to view a graph edge using the GDN console web UI.
Click Data > Graphs.
Click the graph that you want to view an edge for.
Click the edge that you want to view.
Click Edit (the pencil icon).
Macrometa displays the edge record associated with the edge that you clicked.
Use our interactive API Reference with code generation in 18 programming languages to Get (View) an Edge.
Use the gdnsl graph edge describe CLI command to view a graph edge.
Update an Edge
These instructions provide several methods of updating a graph edge. Updating means that you to specify which edge properties to update and leave the rest of the properties unchanged. If you want to update all the properties, then you should Replace an Edge.
- Web Console
- REST API
- CLI
Follow these instructions to update a graph edge using the GDN console web UI.
Click Data > Graphs.
Click the graph for which you want to update an edge.
Click the edge that you want to update.
Click Edit (the pencil icon).
Macrometa opens the edge record in an editing window.
Update any information necessary.
Click Save.
Use our interactive API Reference with code generation in 18 programming languages to Modify (Update) an Edge.
Use the gdnsl graph edge update CLI command to update a graph edge.
Replace an Edge
These instructions provide several methods of replacing a graph edge. This command completely overwrites the existing edge document with a new one, including any properties that were not explicitly included in the new document. In other words, all properties not present in the new document are removed. If you only want to update some of the properties, then you should Update an Edge.
- Web Console
- REST API
- CLI
Follow these instructions to replace a graph edge using the GDN console web UI.
Click Data > Graphs.
Click the graph for which you want to replace an edge.
Click the edge that you want to replace.
Click Edit (the pencil icon).
Macrometa opens the edge record in an editing window.
Update any information necessary.
Click Save.
Use our interactive API Reference with code generation in 18 programming languages to Replace an Edge Definition.
Use the gdnsl graph edge replace CLI command to replace a graph edge.
Delete an Edge
These instructions provide several methods of deleting an edge from a graph.
- Web Console
- REST API
- CLI
Follow these instructions to delete a graph edge using the GDN console web UI.
- Log in to your Macrometa account.
- Click Data > Graphs.
- Click the graph for which you want to delete a edge.
- Click the edge that you want to delete.
- Click Delete (the trash can icon).
- In the Delete edge window, click Delete.
- Macrometa asks you to confirm the deletion. Click Yes.
Use our interactive API Reference with code generation in 18 programming languages to Remove (Delete) an Edge.
Use the gdnsl graph edge delete CLI command to delete a graph edge.
List Edge Collections
These instructions provide several methods of listing edge collections associated with a graph.
- REST API
- CLI
Use our interactive API Reference with code generation in 18 programming languages to List Edge Collections.
Use the gdnsl graph describe CLI command to get a list of edge collections for a graph.
Add an Edge Collection
These instructions provide several methods of adding an edge collection to a graph.
- Web Console
- REST API
- CLI
Follow these instructions to add an edge collection to a graph using the GDN console web UI.
Click Data > Graphs.
Click Edit next to the graph that you want to add a edge collection to.
Click the plus icon.
A new set of three relationship fields appear. You can do this more than once.
Click in the Edge Collections field, and then select the edge collection that you want to add.
Select the From Collections and To Collections associated with this edge collection.
Click Update.
Use our interactive API Reference with code generation in 18 programming languages to Add an Edge Definition.
Use the gdnsl graph update CLI command to add an edge collection to a graph.
Remove an Edge Collection
These instructions provide several methods of removing an edge collection from a graph. If the graph only has one edge collection, then you can change it, but you cannot remove it.
- Web Console
- REST API
- CLI
Follow these instructions to remove an edge collection from a graph using the GDN console web UI.
- Log in to your Macrometa account.
- Click Data > Graphs.
- Click Edit next to the graph that you want to remove an edge collection from.
- In the Edge Collections field, click the X next to the edge collection that you want to remove.
- Click Update.
Use our interactive API Reference with code generation in 18 programming languages to Remove an Edge Definition.
Use the gdnsl graph update CLI command to remove an edge collection from a graph.