Skip to the content.

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

Reference

Internals

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