While Ardoq works with terms like organization, components, references and fields, The Gremlin graph query language uses equivalent, more technical terms from graph theory, like graph, vertices, edges and properties. We will start with introducig the concept of a graph, and then explain how different graph terms correspond to terms you may be familiar with from Ardoq.

What is a graph?

In graph theory, a graph is a structure consisting of vertices and edges. Vertices are also known as nodes. You can think of the vertices as dots and the edges as lines which connect the dots. The dots don't necessarily have to be connected to other dots in the graph to be part of the graph.


Directed property graphs

The graph used by Ardoq is called a directed property graph. This means that edges have a direction, and that the vertices and edges can have properties, i.e. the vertices and edges contain data which describe them. Because the edges have a direction, they are typcally visualized as arrows, rather than just lines.

How the data in Ardoq corresponds to graph terminology

  • Components in Ardoq correspond to vertices in the graph.

  • References and hierarchical relationships in Ardoq correspond to the edges in the graph.

  • Default and custom fields, as well as tags in Ardoq correspond to the properties of the vertices and edges of the graph.

  • An organization in Ardoq, or rather, all of the components and references in the organization, correspond to the whole graph. As such, the results which can be retrieved from a Gremlin query are not limited to a particular workspace, unless you choose to do so.

  • A workspace in Ardoq is a subset of the graph. From Gremlin's perspective, the information about which workspace a component or reference belongs to is simply stored in a property called "rootWorkspace" on the vertices and edges.

Some simple examples

The following query returns all vertices (V) in the graph (g), i.e. all components in the organization:

all components in an organization

In Gremlin, the implicit relationship from a component to its parent component is available as an edge of type "ardoq_parent".

The following query returns all edges (E) in the graph (g), i.e. all references and hierarchical relationships in the organization:


If you want your graph search to only have access to actual Ardoq references and not hierarchical relationships, you can replace the traversal source g (graph) with gxp (graph excluding parents) at the start of the query.

The following query returns all vertices in the graph, but there will be no "ardoq_parent" edges available to traverse:


The following query returns all edges in the graph which represent Ardoq references, but not those which represent hierarchical relationships:


The following query returns all components in a particular workspace by filtering the components based on their workspace id (the id of a workspace can be found in your browser's URL bar when you have a workspace open):

g.V().has('rootWorkspace', 'de21bf3cfd8fc78aaa42406e')

Did this answer your question?