🌌 Star Wars Day Graph Challenge: The Force of Connections Coming May the 4th!

// ── NODES (exactly 20) ──
CREATE (:Person  {name:'Anakin Skywalker'}),
       (:Person  {name:'Luke Skywalker'}),
       (:Person  {name:'Leia Organa'}),
       (:Person  {name:'Rey'}),
       (:Person  {name:'Ben Solo'}),
       (:Person  {name:'Palpatine'}),
       (:Person  {name:'Obi-Wan Kenobi'}),
       (:Planet  {name:'Tatooine'}),
       (:Planet  {name:'Mustafar'}),
       (:Planet  {name:'Dagobah'}),
       (:Planet  {name:'Ahch-To'}),
       (:Planet  {name:'Exegol'}),
       (:Artifact {name:'Skywalker Lightsaber'}),
       (:Artifact {name:'Leia Lightsaber'}),
       (:Artifact {name:'Sith Wayfinder'}),
       (:Concept  {name:'Chosen One Prophecy'}),
       (:Concept  {name:'Force Dyad'}),
       (:Event    {name:'Order 66'}),
       (:Event    {name:'Battle of Endor'}),
       (:Event    {name:'Battle of Exegol'});

// ── MATCH for handles ──
MATCH (ani:Person {name:'Anakin Skywalker'}),
      (luk:Person {name:'Luke Skywalker'}),
      (lei:Person {name:'Leia Organa'}),
      (rey:Person {name:'Rey'}),
      (ben:Person {name:'Ben Solo'}),
      (pal:Person {name:'Palpatine'}),
      (obi:Person {name:'Obi-Wan Kenobi'}),
      (tat:Planet {name:'Tatooine'}),
      (mus:Planet {name:'Mustafar'}),
      (dag:Planet {name:'Dagobah'}),
      (ahc:Planet {name:'Ahch-To'}),
      (exo:Planet {name:'Exegol'}),
      (sab:Artifact {name:'Skywalker Lightsaber'}),
      (leisab:Artifact {name:'Leia Lightsaber'}),
      (way:Artifact {name:'Sith Wayfinder'}),
      (prop:Concept {name:'Chosen One Prophecy'}),
      (dyad:Concept {name:'Force Dyad'}),
      (o66:Event {name:'Order 66'}),
      (endor:Event {name:'Battle of Endor'}),
      (exEvt:Event {name:'Battle of Exegol'})

// ── RELATIONSHIPS (36 ⇢ well under 48) ──
CREATE
// origins & upbringing
 (ani)-[:BORN_ON]->(tat),                 (luk)-[:RAISED_ON]->(tat),
 (lei)-[:BORN_ON]->(tat),                (rey)-[:BURIES_SABERS_AT]->(tat),
// family
 (ani)-[:FATHER_OF]->(luk),              (lei)-[:MOTHER_OF]->(ben),
 (luk)-[:MENTOR_OF]->(ben),
// mentorship & temptation
 (obi)-[:MENTOR_OF]->(ani),              (ani)-[:APPRENTICE_TO]->(pal),
 (pal)-[:TEMPTS]->(ben),
// prophecy & dyad
 (ani)-[:FULFILLS]->(prop),              (rey)-[:REIGNITES]->(prop),
 (rey)-[:DYAD_WITH]->(ben),              (dyad)-[:BALANCES]->(prop),
// lightsaber lineage
 (sab)-[:FORGED_BY]->(ani),              (sab)-[:PASSED_TO]->(luk),
 (sab)-[:CALLS_TO]->(rey),               (leisab)-[:FORGED_BY]->(lei),
 (leisab)-[:PASSED_TO]->(rey),
// wayfinder & dark plans
 (way)-[:FORGED_BY]->(pal),              (way)-[:LOCATED_AT]->(exo),
 (o66)-[:EXECUTED_BY]->(pal),            (ani)-[:PARTICIPATES_IN]->(o66),
// personal journeys
 (ani)-[:FALLS_ON]->(mus),               (luk)-[:TRAINS_ON]->(dag),
 (luk)-[:EXILES_ON]->(ahc),
// climactic battles
 (endor)-[:DEFEATS]->(pal),              (luk)-[:HERO_OF]->(endor),
 (exEvt)-[:DEFEATS]->(pal),              (rey)-[:HERO_OF]->(exEvt),
 (ben)-[:HERO_OF]->(exEvt),              (exEvt)-[:LOCATED_AT]->(exo);

“Reflections of the Force – Three Generations in Perfect Symmetry.”
This mini-galaxy is built around the idea that history rhymes in Star Wars. Each spoke pairs an OT hero with an ST counterpart: Anakin ⇄ Ben, Luke ⇄ Rey, Obi-Wan ⇄ Leia. A central hub of abstract nodes—Chosen One Prophecy and Force Dyad—captures how individual choices echo through prophecy and cosmic balance. Artifacts (two sabres + Sith Wayfinder) orbit their makers, while three era-defining battles form an outer ring. With one hop you can surface mirrored arcs (e.g., "Rey DYAD_WITH Ben" vs. "Anakin APPRENTICE_TO Palpatine") or trace a lightsaber’s whole life cycle. The layout looks like a six-pointed star, so a force-direct graph literally shows the saga’s repeating geometry.

Added a star wars theme color:

node {
stroke-color: #000000;
stroke-width: 1px;
}
node.Person { color: #FFE81F; } /* that classic crawl yellow /
node.Artifact { color: #4FC3F7; } /
sky-blue for sabers etc. */
node.Concept { color: #B388FF; }
node.Planet { color: #8BC34A; }
node.Event { color: #FF7043; }
relationship { color: #AAAAAA; }


1 Like

I love the depth around this - the judges are going to have tough time picking a winner! Thanks for sharing.

The Description

Star Wars Day Graph Challenge

THE WAY OF THE FORCE

THE GALAXY IS CHALLENGED! Developers across the stars have been called upon to build their own Star Wars universe using NEO4J and their most powerful CYPHER skills.

Amidst the chaos of data structures, a new hope emerges. A graph that maps the heritage of the Force as it spreads through the galaxy, entangling the characters of Star Wars episodes I through IX.

Master-apprentice bonds, padawan relationships, and family connections are all revealed in this network of connections across the whole saga. In other words:
THIS IS THE WAY (of the Force)

Of course, you can find the whole Intro as video. Enjoy!

The Code

MERGE(darth_maul:Sith {name: 'Darth Maul', master: 'Darth Sidious/Palpatine'})
MERGE(darth_sidious:Sith {name: 'Darth Sidious/Palpatine'})
MERGE(darth_vader: Sith {name: 'Darth Vader', master: 'Darth Sidious/Palpatine', alias: 'Anakin Skywalker'})
MERGE(darth_tyranus: Sith {name: 'Darth Tyranus', master: 'Darth Sidious/Palpatine', alias: 'Dooku'})
MERGE(snoke: Sith {name: 'Snoke'})
MERGE(kylo_ren: Sith {name: 'Kylo Ren', master: 'Snoke', alias: 'Ben Solo'})
MERGE(mace_windu: Jedi {name: 'Mace Windu'})
MERGE(dooku: Jedi {name: 'Dooku', master: 'Yoda'})
MERGE(yoda: Jedi {name: 'Yoda'})
MERGE(qui_gon: Jedi {name: 'Qui-Gon Jinn', master: 'Dooku'})
MERGE(anakin: Jedi {name: 'Anakin Skywalker', master: ['Qui-Gon Jinn', 'Obi-Wan Kenobi']})
MERGE(obi_wan: Jedi {name: 'Obi-Wan Kenobi', master: 'Qui-Gon Jinn'})
MERGE(luke: Jedi {name: 'Luke Skywalker', master: ['Obi-Wan Kenobi', 'Yoda'], mother: 'Padmé Amidala', father: 'Anakin Skywalker'})
MERGE(leia: Jedi {name: 'Leia Organa', master: 'Luke Skywalker', mother: 'Padmé Amidala', father: 'Anakin Skywalker', partner: 'Han Solo'})
MERGE(rey: Jedi {name: 'Rey', master: 'Luke Skywalker', mother: "Rey's mother", father: "Rey's father"})
MERGE(ben_solo: Jedi {name: 'Ben Solo', master: 'Luke Skywalker', mother: 'Leia Organa', father: 'Han Solo'})
MERGE(han_solo: Other {name: 'Han Solo'})
MERGE(padme: Other {name: 'Padmé Amidala', partner: 'Anakin Skywalker'})
MERGE(mom: Other {name: "Rey's mother", partner: "Rey's father"})
MERGE(dad: Other {name: "Rey's father", father: 'Darth Sidious/Palpatine'})

WITH darth_maul, darth_sidious, darth_tyranus, darth_vader, snoke, kylo_ren, mace_windu, dooku, yoda, qui_gon, obi_wan, anakin, luke, leia, rey, ben_solo, han_solo, padme, mom, dad

CALL(darth_maul, darth_sidious, darth_tyranus, darth_vader){
    MATCH(n: Sith)
    MATCH(m: Sith) WHERE m.name IN n.master
    MERGE (m)-[:MASTER_OF]->(n)
}

CALL(dooku, yoda, qui_gon, obi_wan, anakin, luke, leia, rey, ben_solo){
    MATCH(n: Jedi)
    MATCH(m: Jedi) WHERE m.name IN n.master
    MERGE (m)-[:MASTER_OF]->(n)
}

CALL(darth_vader, darth_tyranus, kylo_ren){
    MATCH(n)
    MATCH (m: Sith {alias: n.name})
    MERGE (n)-[:IS]-(m)
}

CALL(luke, leia, ben_solo, rey){
    MATCH(n)
    MATCH(m {name: n.mother})
    MATCH(l {name: n.father})
    MERGE (m)-[:IS_MOTHER_OF]-(n)
    MERGE (l)-[:IS_FATHER_OF]-(n)
}

MERGE (darth_sidious)-[:IS_FATHER_OF]-(dad)

MERGE (darth_sidious)-[:CREATED]-(snoke)

Creator's note:
And for the creative ones among you, maybe you can find a spaceship in the star constellation of the graph...

1 Like

CREATE
// People (10 nodes)
(p1:Person {name: "Anakin Skywalker"}),
(p2:Person {name: "Obi-Wan Kenobi"}),
(p3:Person {name: "Luke Skywalker"}),
(p4:Person {name: "Rey"}),
(p5:Person {name: "Han Solo"}),
(p6:Person {name: "Lando Calrissian"}),
(p7:Person {name: "Din Djarin"}),
(p8:Person {name: "Bo-Katan Kryze"}),
(p9:Person {name: "Sabine Wren"}),
(p10:Person {name: "Moff Gideon"}),

// Objects (10 nodes)
(o1:Object {name: "Anakin's Lightsaber"}),
(o2:Object {name: "Darksaber"}),
(o3:Object {name: "Millennium Falcon"}),
(o4:Object {name: "Luke's Green Lightsaber"}),
(o5:Object {name: "Leia's Lightsaber"}),
(o6:Object {name: "Dark Rey's Lightsaber"}),
(o7:Object {name: "Yoda's Lightsaber"}),
(o8:Object {name: "Kylo Ren's Lightsaber"}),
(o9:Object {name: "Mace Windu's Lightsaber"}),
(o10:Object {name: "Qui-Gon Jinn's Lightsaber"}),

// Relationships (max 48)
(p1)-[:HELD {start_year: -22, end_year: -19}]->(o1),
(p2)-[:HELD {start_year: -19, end_year: -19}]->(o1),
(p3)-[:HELD {start_year: -2, end_year: 0}]->(o1),
(p4)-[:HELD {start_year: 34, end_year: 35}]->(o1),
(p5)-[:OWNED {start_year: -5, end_year: 3}]->(o3),
(p6)-[:OWNED {start_year: -7, end_year: -5}]->(o3),
(p5)-[:OWNED {start_year: 4, end_year: 28}]->(o3),
(p4)-[:OWNED {start_year: 35, end_year: 40}]->(o3),
(p7)-[:HELD {start_year: 9, end_year: 11}]->(o2),
(p8)-[:HELD {start_year: 11, end_year: 12}]->(o2),
(p9)-[:HELD {start_year: 12, end_year: 13}]->(o2),
(p10)-[:HELD {start_year: 8, end_year: 9}]->(o2),
(p3)-[:HELD {start_year: 4, end_year: 28}]->(o4),
(p4)-[:HELD {start_year: 34, end_year: 36}]->(o4),
(p4)-[:HELD {start_year: 36, end_year: 37}]->(o5),
(p4)-[:HELD {start_year: 36, end_year: 37}]->(o6),
(p1)-[:HELD {start_year: -22, end_year: -21}]->(o9),
(p2)-[:HELD {start_year: -32, end_year: -28}]->(o10),
(p3)-[:HELD {start_year: 1, end_year: 10}]->(o7),
(p8)-[:HELD {start_year: 13, end_year: 14}]->(o2),
(p9)-[:HELD {start_year: 14, end_year: 15}]->(o2),
(p5)-[:HELD {start_year: 5, end_year: 6}]->(o8),
(p4)-[:HELD {start_year: 36, end_year: 37}]->(o8)

This Neo4j graph is a Jedi-grade ledger of galactic hand-me-downs—tracking legendary Star Wars objects like Anakin’s lightsaber, the Darksaber, and the Millennium Falcon as they get passed around like family heirlooms at a very dysfunctional Thanksgiving. Each node represents a famous person or object from the galaxy far, far away, and the relationships show who held or owned what, with time windows (start and end years in BBY and ABY) to track who had what, when. It’s perfect for answering serious lore questions like “Who held the Darksaber last?” or deeply philosophical ones like “Is it still stealing if your uncle gave it to you with the Force?”

Other examples

Who force-gripped the Darksaber like it was hot for the shortest amount of time?

MATCH (p:Person)-[r:HELD]->(o:Object {name: "Darksaber"})
WITH p.name AS name, (r.end_year - r.start_year) AS duration
RETURN name, duration
ORDER BY duration
LIMIT 1

Because not everyone can handle a glowstick of destiny without cutting themselves—or their reign—short.

Who touched the most objects? (Time to disinfect the Force)

MATCH (p:Person)-[r]->(o:Object)
WITH p.name AS name, COUNT(DISTINCT o) AS touched
RETURN name, touched
ORDER BY touched DESC
LIMIT 1

Winner gets a bottle of galactic Purell.

This graph lets you tell stories, trace legacy, and settle heated fandom debates with cold hard Cypher. Want to add Yoda’s walking stick next? We can track that too—assuming it wasn’t eaten by Dagobah wildlife.

1 Like

Nice job @aaron-dsouza getting in under the wire. This is the last submission! @alison1, @jason.koo and I have our work cut out for us. Stay tuned! to see who really is one with the Force - at least here. :)

:trophy: Star Wars Day Graph Challenge – Winner Announced!

Thanks to everyone who joined our Star Wars Day Graph Challenge — your creativity, storytelling, and Cypher skills brought the Force to life in so many unique ways.

Our Jedi Council of judges — aka: @jason.koo, @alison1, and myself— had a blast reviewing these. It was incredibly close, and every submission offered something special.

Here’s what each of you contributed to the galaxy:

  • @jo314 made a stellar debut with a clean Force lineage graph, a Millennium Falcon hidden pic and bonus video intro.
  • @prasanthmalla.ds captured Episode III’s pivotal moments with rich structure and emotional weight.
  • @satejkumarsahu impressed with a symmetrical graph that visually mirrored saga themes.
  • @nawar.alwesh delivered sharp Cypher and GenAI-inspired visuals with a modern edge.
  • @GreenFlux showed excellent Cypher skill and API integration in a developer-focused graph. (Here is a link the awesome blog!)
  • @aaron-dsouze created a clear and thematic structure contrasting light and dark sides.
  • @Aldrinnm added classic Star Wars flair with a fun, quote-driven graph.

:1st_place_medal: And the winner is… @BPS_DWLightsaber Lineage

This graph traced the saber’s journey from Anakin to Rey with expressive Cypher, clean design, and storytelling that visually and thematically stood out. A truly Jedi-worthy submission!

You’ve earned your “Special Badge (coming soon), Neo4j T-shirt, and eternal bragging rights. please DM me your t-shirt size, address and phone number!


Thanks again to all who participated — this community challenge was a joy to host.
May the Cypher be with you!

1 Like