Graph Database: Integration
Graph Database: Integration
Part of: Graph Database User Guide
SQL Joins with Graph
Query graphs from SQL using HeliosDB’s unified engine:
-- Find friends of user in SQL resultWITH user_ids AS ( SELECT id, name FROM users WHERE city = 'San Francisco')SELECT u.name, GRAPH_NEIGHBORS(u.id, 'FRIEND_OF', 2) AS friendsFROM user_ids u;REST API
Access graph database via REST:
# Add nodecurl -X POST http://localhost:8080/api/graph/nodes \ -H "Content-Type: application/json" \ -d '{ "label": "Person", "properties": { "name": "Alice", "age": 28 } }'
# Add edgecurl -X POST http://localhost:8080/api/graph/edges \ -H "Content-Type: application/json" \ -d '{ "source": 1, "target": 2, "label": "FRIEND_OF", "weight": 1.0, "properties": {} }'
# Query with Cypher (via REST)curl -X POST http://localhost:8080/api/graph/query \ -H "Content-Type: application/json" \ -d '{ "query": "MATCH (p:Person) WHERE p.age > 25 RETURN p.name" }'
# Run algorithmcurl -X POST http://localhost:8080/api/graph/algorithms/pagerank \ -H "Content-Type: application/json" \ -d '{ "nodes": [1, 2, 3, 4, 5], "damping": 0.85, "iterations": 100 }'Bolt Protocol (Neo4j Drivers)
Use Neo4j drivers to connect to HeliosDB:
# Python example using neo4j driverfrom neo4j import GraphDatabase
driver = GraphDatabase.driver( "bolt://localhost:7687", auth=("heliosdb", "password"))
with driver.session() as session: # Run Cypher query result = session.run(""" MATCH (p:Person)-[:FRIEND_OF]->(friend) WHERE p.name = 'Alice' RETURN friend.name, friend.age """)
for record in result: print(f"{record['friend.name']}, age {record['friend.age']}")
driver.close()// JavaScript exampleconst neo4j = require('neo4j-driver');
const driver = neo4j.driver( 'bolt://localhost:7687', neo4j.auth.basic('heliosdb', 'password'));
const session = driver.session();
session .run('MATCH (p:Person) WHERE p.age > $age RETURN p.name', { age: 25 }) .then(result => { result.records.forEach(record => { console.log(record.get('p.name')); }); }) .finally(() => session.close());
driver.close();GraphQL Integration
type Person { id: ID! name: String! age: Int! friends: [Person!]! @relationship(type: "FRIEND_OF", direction: OUT)}
type Query { person(name: String!): Person people(city: String): [Person!]!}
query { person(name: "Alice") { name age friends { name age } }}Navigation
- Previous: Performance Optimization
- Next: Migration from Neo4j
- Index: Graph Database User Guide
Version: 6.5 Last Updated: November 17, 2025