Fyper
Type-safe Cypher queries in F#.
type Person = { Name: string; Age: int }
type ActedIn = { Roles: string list }
let findActors = cypher {
for p in node<Person> do
for m in node<Movie> do
matchRel (p -- edge<ActedIn> --> m)
where (p.Age > 30)
select (p.Name, m.Title)
}
// MATCH (p:Person) MATCH (m:Movie) MATCH (p)-[:ACTED_IN]->(m)
// WHERE p.age > $p0 RETURN p.name, m.title
Install
dotnet add package Fyper # Core
dotnet add package Fyper.Neo4j # Neo4j driver
dotnet add package Fyper.Age # Apache AGE driver
dotnet add package Fyper.Parser # Cypher parser
Guide
- Getting Started – first query in 5 minutes
- Relationships – matchRel, OPTIONAL MATCH, paths
- Mutations – CREATE, SET, DELETE, MERGE
- Transactions – atomic multi-query operations
- Parser – parse Cypher strings into AST
Reference
- CE Operations – all operations at a glance
- Functions – Cypher module API
- Types – AST, GraphValue, exceptions
- Neo4j Driver – setup and usage
- AGE Driver – PostgreSQL + AGE setup
Internals
- Architecture – data flow and modules
- Performance – benchmarks
Packages
| Package | Deps | Description |
|---|---|---|
Fyper |
FSharp.Core | Query builder + compiler |
Fyper.Parser |
Fyper | Cypher string parser |
Fyper.Neo4j |
Neo4j.Driver | Neo4j Bolt driver |
Fyper.Age |
Npgsql | Apache AGE driver |