Cyphra vs the Neo4j GraphQL Library
The Neo4j GraphQL Library (@neo4j/graphql) turns
GraphQL type definitions into a GraphQL API. Cyphra turns a .cyphra schema into a typed
TypeScript client (db.user.findMany(…)) and migration files, and its
@cyphra/graphql package serves the same API as @neo4j/graphql 7 from the same type
definitions. Pick @neo4j/graphql if you need what @cyphra/graphql does not support yet
(Apollo Federation, @vector, among others) or want a library maintained
by Neo4j. Pick Cyphra if you want migrations and a typed client, with or without the GraphQL API.
At a glance
| Cyphra | @neo4j/graphql | |
|---|---|---|
| GraphQL API | @cyphra/graphql: the v7 API from the same type definitions, subscriptions included, except some directives (see below) | An executable GraphQL schema: queries, mutations, filtering, sorting, pagination, subscriptions |
| Typed client | Generated from .cyphra (cyphra generate) | None since v6 (the OGM was discontinued, see below) |
| Model written in | .cyphra schema; cyphra import graphql converts v7 type definitions | GraphQL SDL with @node and @relationship |
| Custom Cypher | db.$cypher`…`, query builder; @cypher in the GraphQL API | @cypher directive, custom resolvers |
| Auth rules | @authentication / @authorization in the GraphQL API; your own code for the client | @authentication and @authorization directives |
| Constraints and indexes | Generated migrations (cyphra migrate dev) | Not created by the library (see below) |
| Maintainer | Cyphra (open source, MIT) | Neo4j, Inc. (open source, Apache-2.0) |
| Current version | cyphra 0.7.0 (2026-11-21) | 7.6.8 (latest, 2026-11-10); 5.x is LTS |
The same model, two ways
This is the example from the @neo4j/graphql documentation:
type Product @node {
productName: String
category: [Category!]! @relationship(type: "PART_OF", direction: OUT)
}
type Category @node {
categoryName: String
products: [Product!]! @relationship(type: "PART_OF", direction: IN)
}From it, both @neo4j/graphql and @cyphra/graphql generate the same GraphQL API. Creating a
product with a new category is a mutation:
mutation {
createProducts(
input: [
{
productName: "New Product"
category: { create: [{ node: { categoryName: "New Category" } }] }
}
]
) {
products {
productName
category {
categoryName
}
}
}
}The same graph as a Cyphra schema (what cyphra import graphql writes from these type definitions,
aligned by hand):
node Product {
productName String?
category Category[] @relationship(type: "PART_OF", direction: OUT)
}
node Category {
categoryName String?
products Product[] @relationship(type: "PART_OF", direction: IN)
}And the same write, from TypeScript, after cyphra generate:
const product = await db.product.create({
data: { productName: "New Product", category: { create: [{ categoryName: "New Category" }] } },
select: { productName: true, category: { select: { categoryName: true } } },
});
// { productName: string | null; category: { categoryName: string | null }[] }Both write the same nodes and the same PART_OF relationship. The difference is who sends the
request: a GraphQL client over HTTP, or your own code in the same process. With Cyphra you can have
both on one graph and one driver (typed client alongside
GraphQL).
What @neo4j/graphql does that Cyphra does not
@cyphra/graphql serves the v7 API for queries, aggregations, mutations, @authentication /
@authorization, @cypher fields, custom resolvers, @fulltext queries, unions, interfaces, CDC
subscriptions and the schema configuration directives. Its compatibility suite runs 288 operations
on 20 apps, with expected results recorded from @neo4j/graphql 7.6.8, and 305 of the 308 checks
pass, the three others on purpose (report ). What it
does not have yet:
- The Apollo Federation integration.
- Interfaces implementing interfaces,
@cypherfields returning unions,@vectorqueries, and theTime,LocalTime,LocalDateTime,Duration,PointandCartesianPointscalars. @populatedBy,@relayIdand@coalesce. The schema configuration directives (@query,@mutation,@selectable,@settable,@filterable,@sortable,@limit) work.- Versions before 7.
@cyphra/graphqlreproduces the v7 API only; the 5.x LTS API differs.
For these, makeSchema throws an UnsupportedTypeDefsError instead of serving a different API. A
few authorization and @cypher filter cases are stricter than in v7; the
GraphQL page lists them.
What Cyphra does that @neo4j/graphql does not
- Migrations. Cyphra diffs your schema and writes migration files: constraints,
range, vector and full-text indexes, backfills of new defaults, and guards for new required fields, tracked in the
database and checked in CI with
cyphra migrate status. The GraphQL Library does not manage the database schema: its docs say of@fulltextthat “using this directive does not automatically ensure the existence of these indexes. They must be created manually.” In Cyphra,@@fulltextin the schema creates the index, andcyphra import graphqlwrites it from your@fulltextdirectives. - A typed client for server code.
findMany,include,select, nested writes and$transaction, with result types inferred from your arguments (Typed client). - Typed relationship properties on reads and writes, through
$edge. - A local database and introspection in the CLI:
cyphra devstarts Neo4j in Docker, andcyphra pullwrites a schema from an existing database (CLI). - No APOC requirement for the GraphQL API: v7 runs some mutation checks with APOC,
@cyphra/graphqlruns them in plain Cypher.
If you used @neo4j/graphql-ogm
The GraphQL Library used to ship an OGM, @neo4j/graphql-ogm, for typed CRUD from server code
using the same type definitions. Neo4j’s migration guide for version 6 says: “The OGM is
discontinued with version 6.0.0 of the GraphQL Library”, and “Version 5 (LTS) is the last version
to feature the OGM.” On npm, the latest tag of @neo4j/graphql-ogm is still 5.11.4 (January
2025), with 5.x releases continuing under the lts tag. The package carries no npm deprecation
notice.
With Cyphra, cyphra import graphql converts your type definitions to schema.cyphra, and the
generated client works on the same graph as the GraphQL API, through the same driver. You do not
write the model a second time, but you keep two files: when the model changes, edit both, or edit
the type definitions and run cyphra import graphql --merge. The client does not apply your
@authorization rules or @cypher fields; those stay in the GraphQL API.
When to choose @neo4j/graphql instead
- You need Apollo Federation,
@vectoror another feature from the list above. - You are on the 5.x LTS line and do not plan to move to version 7.
- You want a library maintained by Neo4j, Inc. with a published versioning policy (current and LTS lines).
When to choose Cyphra
- You run
@neo4j/graphql7 and want migrations and a typed client without changing your frontend queries: follow Migrate from @neo4j/graphql. - Your API is not GraphQL, or you write its resolvers yourself.
- You want the Prisma-style workflow on Neo4j: schema, generated client, migrations (Prisma-style ORM for Neo4j).
- You want constraints, indexes and data changes versioned with your code (constraints and indexes as code).
New to the vocabulary? See ORM vs OGM and Cypher in the glossary.
More comparisons
Sources
Checked on 2026-11-21.
- Neo4j, GraphQL Library documentation (version 7): type definitions example, mutation example, feature list (“Subscriptions to server events”, “Apollo federation integration”) (code reformatted with Prettier)
- Neo4j, Versioning : “Version 7 is the recommended version and actively being developed”, version 5 is LTS
- Neo4j, Directives :
@cypher,@authentication,@authorization,@jwt,@fulltext,@vector - Neo4j, Indexes and constraints :
@fulltextindexes must be created manually - Neo4j, Migration to version 6 : OGM discontinued
- npm registry,
@neo4j/graphql: 7.6.8 published 2026-11-10, Apache-2.0 - npm registry,
@neo4j/graphql-ogm:latest5.11.4 (2025-01-24),lts5.12.17 (2026-11-10) - GitHub, neo4j/graphql : not archived, last push 2026-11-21
- Cyphra,
compat/graphql/REPORT.md: 179 of 181 checks pass against goldens from@neo4j/graphql7.6.8 (the two others are nested union writes where v7 ignoreswhere). The unsupported directives were checked by callingcompat.v7.makeSchemaon each one. - The Cyphra snippets above were generated and run with the code of
cyphra0.7.0 against Neo4j 5.