1. Home
  2. /
  3. Gremlin
  4. /
  5. Add Vertex and Edge

Add Vertex and Edge - Gremlin Typing CST Test

Loading…

Add Vertex and Edge — Gremlin Code

Adding vertices and an edge between them in Gremlin.

g.addV("person").property("name", "Alice")
.addV("person").property("name", "Bob")
.addE("knows").from(g.V().has("name","Alice")).to(g.V().has("name","Bob"))

Gremlin Language Guide

Gremlin is a graph traversal language and virtual machine used across the Apache TinkerPop graph computing framework. It supports imperative and functional traversal steps to query, analyze, and mutate property graph data across both OLTP and OLAP graph systems.

Primary Use Cases

  • ▸Multi-hop graph traversals
  • ▸Pattern search across large graphs
  • ▸Fraud ring analysis
  • ▸Network and IT topology mapping
  • ▸Recommendation engines
  • ▸Knowledge graph pipelines

Notable Features

  • ▸Traversal-based query model
  • ▸Supports OLTP + OLAP graph computing
  • ▸Works across many graph databases
  • ▸Functional chaining via step pipelines
  • ▸Gremlin Server & client drivers
  • ▸Graph mutations + analytics

Origin & Creator

Developed by Marko A. Rodriguez and the Apache TinkerPop team. First introduced in 2009; reached widespread adoption with TinkerPop 3 in 2015.

Industrial Note

Gremlin fits systems that require deep, algorithmic, multi-hop graph processing: fraud graphing, cybersecurity threat intelligence, bioinformatics networks, enterprise knowledge graphs, logistics routing, graph analytics pipelines, and large-scale distributed graph engines.

More Gremlin Typing Exercises

Basic Gremlin TraversalsFilter by PropertyCount VerticesShortest Path TraversalGroup By PropertyOrder VerticesLimit Traversal ResultsRemove VertexTraversal with Both Directions

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher