FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
20 Gremlin Query Examples for Azure Cosmos DB (Practical Cheat Sheet)
How-ToDevOps

20 Gremlin Query Examples for Azure Cosmos DB (Practical Cheat Sheet)

via Dev.to TutorialBila Akpan1mo ago

Why a Gremlin Cheat Sheet? The Gremlin query language is powerful but has a steep learning curve — especially on Azure Cosmos DB, where partition keys, RU costs, and unsupported steps add complexity that standard TinkerPop tutorials don't cover. This post gives you 20 copy-paste-ready queries organized by category, with Cosmos DB-specific tips for each one. All examples use an e-commerce graph with product , person , and category vertices, but the patterns apply to any domain. Creating Data 1. Add a Vertex with Partition Key g.addV('product').property('id', 'prod-001').property('category', 'electronics').property('name', 'Wireless Headphones').property('price', 79.99).property('inStock', true) Every vertex needs an id (unique within the partition) and the partition key property. If your container's partition key is /category , you must include it as a property. Without it, Cosmos DB assigns a random partition and your queries become expensive cross-partition fan-outs. 2. Add an Edge g.

Continue reading on Dev.to Tutorial

Opens in a new tab

Read Full Article
16 views

Related Articles

150 million users later, Roblox competitor Rec Room is shutting down
How-To

150 million users later, Roblox competitor Rec Room is shutting down

The Verge • 19h ago

Here are our favorite spring cleaning deals from Amazon’s Big Spring Sale
How-To

Here are our favorite spring cleaning deals from Amazon’s Big Spring Sale

The Verge • 20h ago

What we’re looking for in Startup Battlefield 2026 and how to put your best application forward
How-To

What we’re looking for in Startup Battlefield 2026 and how to put your best application forward

TechCrunch • 1d ago

Build Days That Actually Mean Something
How-To

Build Days That Actually Mean Something

Medium Programming • 1d ago

I have blogged about the difference between code coverage and test coverage and why it matters to distinguish between these 2.
How-To

I have blogged about the difference between code coverage and test coverage and why it matters to distinguish between these 2.

Dev.to Beginners • 1d ago

Discover More Articles