Skip to Content
Stability policy

Stability policy

Draft for Cyphra 1.0, not in force yet. This page sets out the policy that will apply from 1.0.0; the maintainers’ decisions are recorded in the Decided notes. Until 1.0, the 0.x rules apply.

This page says what you can rely on when you upgrade Cyphra: which parts of each package are public API, what a major, minor or patch release may change, how features are deprecated and removed, and which databases, drivers and runtimes are supported.

Versioning

Cyphra follows Semantic Versioning 2.0.0  from 1.0.0:

  • Major (2.0.0): may contain breaking changes to the public API. Each one is listed in the changelog with what to change in your app.
  • Minor (1.4.0): new features and deprecations. Code, schemas and migrations that worked on 1.3.x keep working.
  • Patch (1.4.1): bug fixes, security fixes, performance work and documentation.

One version for every package

All published packages are released together with the same version number (a fixed group  in .changeset/config.json): cyphra, @cyphra/cli, @cyphra/runtime, @cyphra/schema, @cyphra/migrator, @cyphra/query, @cyphra/better-auth, @cyphra/graphql, @cyphra/language-server, @cyphra/nestjs and @cyphra/testing. The VS Code extension (cyphra-vscode) is versioned on its own.

What this means for semver:

  • A version number describes the release, not one package. @cyphra/query@1.6.0 can be identical to 1.5.0 when only @cyphra/graphql changed; its changelog then only lists updated dependencies.
  • Use the same version of every Cyphra package in an app: cyphra and @cyphra/cli at 1.6.2, not 1.6.2 and 1.4.0. Mixing versions within the same major is expected to work (see Generated code), but only matching versions are tested together.
  • A breaking change in any package makes the next release a major for all of them. Breaking changes are therefore batched into planned majors, and packages that still need room to change are marked experimental instead of forcing majors on everyone.

Decided: one version for every package after 1.0 (the fixed group stays). Parts that still move fast are marked experimental instead of forcing majors on everyone. Integrations versioned on their own were rejected: users would need a compatibility table.

Before 1.0

Today (0.x), every release with user-facing changes is a minor (0.16.0 → 0.17.0) and may contain breaking changes; patches (0.17.1) only fix bugs. This is the usual 0.x reading of semver, and the rest of this page does not apply until 1.0.0.

Public API

A change is breaking only if it breaks something in this section. Anything not listed here can change in any release.

Decided: everything exported from a package entry point is public, unless tagged @internal. Everything reachable from cyphra, @cyphra/runtime, @cyphra/runtime/edge, … counts, documented or not. Before 1.0 the entry points are audited and internals tagged or removed. An API report checked in CI (for example API Extractor ) is a follow-up, so every change to the public surface shows up in review.

In every package, these are never public API: deep imports into dist/ or src/, declarations tagged @internal, the exact text of error and log messages, the human-readable output of the CLI, the Cypher text Cyphra sends to the database (see Generated Cypher), and the private cyphra-vscode package.

Per package

PackagePublic API
cyphraIts re-exports of @cyphra/schema, @cyphra/query, @cyphra/runtime and @cyphra/migrator, and its export conditions (the edge build leaves out @cyphra/migrator).
@cyphra/schemaThe .cyphra language (syntax, types, decorators and their arguments, what each means), the parse, validate, format and print functions, and the code generators’ options.
@cyphra/runtimeCyphraClient and its options, the generated client’s behavior (below), transactions, the cypher tag, the HTTP transport and the @cyphra/runtime/edge entry point, the Memgraph and FalkorDB dialects, log events and OpenTelemetry span names and attributes, error classes and their fields.
@cyphra/queryThe tagged template and the builder: their functions, parameters and the parameter binding guarantee (interpolated values are always sent as parameters).
@cyphra/migratordefineMigration, the db handle given to migrations, the migration file format, the __CyphraMigration history and drift detection results.
@cyphra/cliCommands, flags, exit codes and machine output.
@cyphra/graphqlThe GraphQL compatibility contract, CDCSubscriptionsEngine, UnsupportedTypeDefsError, and the @neo4j/graphql import functions.
@cyphra/better-authThe adapter’s options and the labels, relationship types and properties it stores in the database.
@cyphra/nestjsCyphraModule, @InjectCyphra(), @Transactional() and its transaction propagation rules, CyphraHealthIndicator.
@cyphra/testingcreateTestDatabase(), startDatabase(), the isolation strategies, factories, and the default container images’ database majors (the exact image tags are not API).
@cyphra/language-serverThe cyphra-language-server binary and its command-line options. Which diagnostics, completions and hovers it offers is not API: they improve in any release.

Generated code and the runtime

cyphra generate writes cyphra.gen.ts (and, if configured, the Zod schemas). In generated code, the exported names and their types are public API: createClient, the model delegates (db.user, db.blogPost), the operations and their arguments and results, and exported helper types. The rest of the file (its layout, private helpers, comments) is not, and can be rewritten in any minor.

For the generated client, public API includes runtime behavior: which records an operation returns, in which order when orderBy is set, how null and missing values are returned, how values are converted (integers, temporal types, points, vectors), what is written by nested writes, how onDelete rules apply, what runs in a transaction, and which error is thrown when.

Decided: same major, runtime at least as new as the CLI that generated the code. Code generated by @cyphra/cli 1.x.y runs on cyphra 1.z for any z ≥ x, so an app can upgrade the runtime (for a security patch) without regenerating. An older runtime is not required to run newer generated code: the generated file checks the runtime version at startup and fails with a clear message on a mismatch.

The schema language

A schema that is valid in 1.x stays valid in every later 1.x and means the same thing: same labels, relationship types, property names and types, same constraints and indexes, same generated types. In a minor, Cyphra may:

  • add syntax, types, decorators and decorator arguments;
  • add warnings (for example a deprecation);
  • make cyphra format / cyphra schema print output differ (formatting is not API).

It may not, outside a major: reject a schema it accepted, change a default (for example the @vectorIndex default similarity: cosine or the default index name <Label>_<field>_vector), or change the generated type of a field. A schema that was accepted but produced a broken client or broken DDL may be rejected in a patch: that is a bug fix, and the changelog says so.

CLI

  • Stable: command names, flag names and their meaning, cyphra.json keys, environment variables (NEO4J_URI, NEO4J_USERNAME, NEO4J_PASSWORD, NEO4J_DATABASE, FALKORDB_URL, FALKORDB_GRAPH, …), exit codes, and the shape of --json output.
  • Exit codes keep their meaning: 0 success, 1 the command ran and found something that needs attention (for example cyphra migrate status with pending migrations or drift, cyphra format --check with an unformatted schema), 2 the check could not run. A new exit code is a breaking change.
  • --json output can gain fields in a minor. Removing or renaming a field, or changing its type or the values of an enum field (such as a migration state), is breaking.
  • Not stable: human-readable output, colors, progress text, prompt wording and the order of warnings. Scripts should use exit codes and --json.

Migrations

Migrations are files you commit and run against production months later, so they get the strongest promise:

  • Migration files. A migration written or generated with 1.x (an .mjs file exporting defineMigration({ name, up }), using the db handle: db.run`…`, db.execute, db.runInTransactionBatches, db.migrate.*) runs unchanged with every later 1.x.
  • History. Applied migrations are recorded as (:__CyphraMigration { name, appliedAt, checksum }), the checksum being the SHA-256 of the file. Within a major, the label, its properties and the checksum algorithm do not change in a way that makes applied migrations look pending or modified. A major that changes them ships an automatic upgrade of the history.
  • Snapshot. migrations/schema.snapshot.json can be read by every later 1.x; a newer CLI may rewrite it in a newer format the next time it generates a migration. An older CLI is not required to read a snapshot written by a newer one.
  • Generated DDL. For the same schema change, a later minor may generate different migration code only if it creates the same database schema (same constraint and index names, types and options), so that drift detection does not report databases migrated by older versions. Already generated migrations are never regenerated.

GraphQL

@cyphra/graphql has one API today: compat.v7, which serves the API that @neo4j/graphql 7 generates from the same type definitions. Its contract is behaving like @neo4j/graphql 7, as measured by the compatibility suite  (expected results recorded from @neo4j/graphql 7.6.8):

  • The printed SDL for supported type definitions stays identical to v7’s.
  • An undocumented difference from v7 is a bug, fixed in a patch even if the fix changes results.
  • The documented differences, where Cyphra is stricter than v7 (authorization, filters on falsy values, @cypher edge cases), are part of the contract. Changing them is breaking, and loosening an authorization rule is never done in a minor or patch.
  • Supporting a type definition that makeSchema rejects today with UnsupportedTypeDefsError (interfaces, @vector, …) is a minor.
  • Following a later @neo4j/graphql 7.x release is a minor. A @neo4j/graphql 8 would get a new compat.v8 (a minor); removing compat.v7 would be a major.

The native GraphQL API (native.makeSchema, which does not imitate @neo4j/graphql) is experimental for now; once stable, it follows the ordinary rules of this page, and its printed SDL is its contract.

Decided: stable at 1.0, under the v7 compatibility contract above; subscriptions are experimental. Unsupported v7 features fail loudly (UnsupportedTypeDefsError), so adding them is additive. Subscriptions are new and need Neo4j Enterprise, which only one CI job covers.

Generated Cypher

The Cypher text the client, the GraphQL layer and the migrator send is not public API: it changes in any release to fix bugs or make queries faster. What is public is its effect: the results, the writes, and the database versions it needs. So:

  • a new query shape that returns the same results is a patch or a minor;
  • a new query shape that needs a newer database than the supported range is a breaking change (it drops a version);
  • a new query shape that needs a newer database within the supported range for a feature that worked before is breaking too; for a new feature it is fine (document the requirement).

If your tests compare Cypher text (for example snapshots of traceQueryText spans or query log events), expect them to change in minors.

Errors

  • Stable: the exported error classes (CyphraError and its subclasses such as CyphraValidationError, NotFoundError, UniqueConstraintError, RestrictError, UnsupportedFeatureError; and others such as @cyphra/graphql’s UnsupportedTypeDefsError), their name, their documented fields (for example the validation issues and each issue’s path, model, field and rule), and which class is thrown in which situation. Database error codes passed through from the server (such as Neo.ClientError.Schema.ConstraintValidationFailed) keep being passed through.
  • Minor: a new, more specific subclass of the class thrown before (code that catches the parent still works), a new documented field.
  • Breaking: throwing a different class for the same situation, throwing where a value was returned (or the reverse), removing or renaming a field.
  • Not stable: messages and stack traces.

Decided: CyphraError gets a code property (for example "CYPHRA_UNIQUE_CONSTRAINT"), added in a 0.x release before 1.0 so the codes are part of the 1.0 surface. Codes are listed on a reference page, are public API, are never reused, and new codes are minors. They work where instanceof does not: two copies of @cyphra/runtime in one app, or errors that were serialized (tRPC, logs, workers).

What is breaking

A change is breaking (major only) if code, a schema, a migration or a script that used the public API as documented stops working, gives different results, or stops compiling. In detail:

ChangeRelease
Removing or renaming an export, option, field, command, flag, decorator, cyphra.json key or environment variableMajor
Changing a default value (an option, a decorator argument, a generated name)Major
Changing documented runtime behavior (results, ordering, null handling, value conversion, transaction scope)Major
Rejecting input that was accepted (schemas, arguments, CLI flags), except input that already produced broken resultsMajor
Type change that makes code that compiled stop compiling (types)Major
Dropping a supported database version, dialect, neo4j-driver major, peer dependency major or Node.js line (exceptions)Major
New exit code, or a --json field removed or retypedMajor
Changing the migration file format, the __CyphraMigration history or the DDL generated for the same schemaMajor
New export, option, field, command, flag, decorator, dialect or supported versionMinor
Deprecation (with a warning)Minor
New optional field in --json output, new error subclass, new warningMinor
Different Cypher with the same results; performance; human-readable outputPatch or minor
Bug fix, including a fix that changes a wrong result or rejects input that produced broken outputPatch
Security fixPatch (even if behavior changes)
Any change to an experimental featureMinor

When a bug fix would change results that many apps are likely to depend on, it ships in a minor with a prominent changelog entry, or behind an option until the next major.

A security fix can change behavior or a default in a patch when there is no compatible way to fix the issue. The changelog and the advisory say what changed.

Type-level changes

TypeScript types are part of the API, but almost any type change can break some code. Cyphra follows Semantic Versioning for TypeScript Types  (semver-ts), which settles the edge cases (inference changes, strict flags, new compiler errors) and gives the TypeScript version policy. In short, it treats as breaking: removing or renaming an exported type; making a parameter type narrower or an argument required; making a result type wider (string → string | null); changing a generated model type for an unchanged schema; raising the minimum TypeScript version outside the support window. Treated as non-breaking: widening a parameter type, adding optional properties to argument types, adding properties to result types, and making a wrong result type correct (a bug fix, called out in the changelog).

Decided: adopt semver-ts , including its rolling support window for TypeScript versions, instead of judging type changes case by case.

Deprecations

A feature is removed only in a major, and only after it has been deprecated in a minor:

  1. Mark it. TSDoc @deprecated with the replacement (editors strike it through); a runtime warning once per process for options and methods (on the client’s warn log level; the deprecated debug option does not warn yet); a warning from cyphra validate and cyphra generate for schema syntax; a warning on stderr for CLI flags and commands.
  2. Document it. The changelog entry and the docs page name the replacement and show the change.
  3. Wait. It keeps working, unchanged, for the deprecation period.
  4. Remove it in the next major after that period, listed in that major’s upgrade guide. Where it is practical, the CLI offers an automatic fix (for example a schema rewrite in cyphra format).

Decided: at least 3 months and at least one minor release between the deprecation and the major that removes it. Every app gets a release to see the warning, without blocking a major for long. A security issue can shorten it; the advisory says why.

Experimental features

Some features ship before their API is settled. They are marked experimental:

  • in the docs, with a callout at the top of the section or page;
  • in TSDoc, with @experimental;
  • for schema-level features, behind an explicit opt-in in cyphra.json (previewFeatures), so nobody depends on one by accident;
  • in the changelog, each time they change.

Experimental features may change or be removed in a minor (never in a patch), with a changelog entry. They become stable in a minor, at which point the rest of this policy applies. They are still covered by security fixes.

Decided: a docs callout and the @experimental TSDoc tag, plus previewFeatures in cyphra.json for schema-level features. A separate cyphra/experimental entry point was rejected. Experimental at 1.0:

FeatureWhy
GraphQL subscriptions (CDCSubscriptionsEngine)New; needs Neo4j Enterprise CDC; one CI job
The native GraphQL API (native of @cyphra/graphql)New; its printed SDL may change until writes and rules land
cyphra studioA development tool whose HTTP API and UI will keep changing
cyphra import graphql / prisma / neogma outputConversions are heuristic; their output should improve without a major
cyphra pushMeant for prototyping; migrations are the supported path

For the import commands, the commands themselves and their flags stay stable; only the content they produce is exempt.

Supported versions

Cyphra supports a version of a database, driver or runtime when CI tests it. Versions outside this section may work, but are not tested and can stop working in a minor.

What CI tests today

From .github/workflows/ci.yml:

DimensionTested in CIDeclared range
Neo4jneo4j:5-community (latest 5.x) with APOC, over Bolt and the HTTP Query API; neo4j:5-enterprise for CDCTyped client 5.6+, some features later (below)
Neo4j calendar versionsNot tested (2025.x and later)Not declared
Memgraphmemgraph/memgraph:3.14.0 (pinned)Not declared
FalkorDBfalkordb/falkordb:v4.22.3 (pinned), falkordb client 7.0.1falkordb peer ^7.0.0
neo4j-driver5.28.3 and 6.3.2, both in the full Neo4j suite, plus cross-major tests^5.28.3 || ^6.0.0
Node.js22 only, on Linuxengines: >=20 on the workspace and @cyphra/language-server only
TypeScript5.9.3@cyphra/schema peer >=5.0.0; @cyphra/cli depends on ^5.9.3
NestJS12 (integration tests); 10 and 11 (unit tests and typecheck)^10 || ^11 || ^12
@neo4j/graphql (reference)7.6.8 (compatibility suite), graphql 16graphql peer ^16.0.0
Better Auth1.7.27 (Better Auth’s adapter conformance suites)^1.7.27
Testcontainers12^11.0.0 || ^12.0.0
Bun, Deno, edge runtimesNot tested (the HTTP transport is tested from Node.js)Bun guide and edge build documented

Neo4j

The typed client needs Neo4j 5.6 or later. Some features need later 5.x releases: relationship property uniqueness 5.7, traverse 5.9, vector indexes and findSimilar 5.15, exact vector search 5.18, the HTTP transport 5.19, shortest paths 5.21, @vectorIndex(quantization) and @cyphra/graphql 5.23. GraphQL subscriptions need Neo4j Enterprise or Aura with Change Data Capture. Neo4j 4.x is not supported.

Decided: the latest Neo4j release is the supported and tested version (Community, plus Enterprise for CDC; a calendar version today, which is also what Aura runs). Older versions from 5.6 work, with the per-feature minimums above, but are not tested. A new Neo4j release is supported once CI passes on it and CI then moves to it; that is not a breaking change.

Memgraph and FalkorDB

The Memgraph and FalkorDB dialects are tested against one pinned version each, and their pages list what each database does not support.

Decided: the tested version and later releases of the same major. CI moves the pinned version forward regularly and the feature matrix is verified against it; a new major is supported once CI passes. The supported range is written on each dialect page (Memgraph 3.x from 3.14, FalkorDB 4.x from 4.22). Dropping a dialect is a major.

neo4j-driver and other peer dependencies

neo4j-driver 5 (from 5.28.3) and 6 are supported; CI runs the whole Neo4j suite on both. For every peer dependency (neo4j-driver, graphql, better-auth, @nestjs/*, testcontainers, @opentelemetry/api, falkordb, typescript), adding a major to the peer range is a minor, and removing one is a major. Each major in a peer range gets a CI job; ranges are not widened without one.

Decided: only in a Cyphra major. Apps pin the driver for their own reasons, and supporting both majors is already tested.

Node.js

Decided: every Node.js LTS line still maintained upstream, each tested in CI. At 1.0 that is Node.js 22 and 24 (and the next even-numbered release once it becomes LTS), with engines.node set in every published package. A line is dropped in a minor after its upstream end of life, announced one minor in advance. Today only Node.js 22 is tested, and only two package.json files declare engines (>=20); Node.js 20 reached end of life in April 2026.

Decided: best effort at 1.0. The docs have a Bun guide, and the edge build (workerd, edge-light and worker conditions) targets Cloudflare Workers and Vercel Edge; none of them runs in CI. Bugs are fixed, but a minor may break them. The export conditions of the edge build are still public API.

TypeScript

Generated code and type definitions are tested with the TypeScript version in the lockfile (5.9.3).

Decided: a rolling two-year window (semver-ts ), starting at 5.9 for 1.0, with a CI job on the minimum. Dropping a version that left the window is a minor; new TypeScript releases are supported once CI passes on them. The @cyphra/schema peer range changes from >=5.0.0 to match.

Security fixes and support

Security issues are reported privately, as described in SECURITY.md. A fix is released as a patch of the latest minor, with a GitHub Security Advisory (and a CVE when it applies).

Releases are published from CI with npm provenance  and npm trusted publishing (no long-lived npm tokens), so you can check that a package was built from this repository (npm audit signatures).

Decided: the previous major gets high and critical security fixes for 6 months after the next major ships, as patches of its last minor. Bug fixes go to the current major only, and older minors of the current major never get backports: upgrading within a major is the supported path.

Release cadence

Releases are cut from main by the Release workflow : changesets merged to main open a “chore: version packages” pull request, and merging it publishes every package. This runs whenever changes land, which has meant several minors a day during 0.x.

Decided: release whenever ready, with no fixed rhythm: every merged version pull request publishes. Majors still get prereleases on the next dist-tag (changesets pre mode) before they become latest, so apps can try them first.

Before 1.0: follow-ups

Changes this policy implies, to make before tagging 1.0.0:

  • Set engines.node in every published package and run CI on Node.js 22 and 24.
  • Move the Neo4j CI jobs to the latest Neo4j release (a calendar version).
  • Write the supported Memgraph and FalkorDB ranges on their dialect pages.
  • Change @cyphra/nestjs’s peer range on cyphra from >=0.17.0 to ^1.0.0, so a future cyphra 2 is not accepted silently.
  • Set the @cyphra/schema typescript peer range to >=5.9 and add a CI job on TypeScript 5.9.
  • Make the generated file check the runtime version at startup.
  • Add a code to CyphraError and its subclasses, in a 0.x release.
  • Audit entry points: tag internals @internal; mark the experimental features with a docs callout and @experimental.
  • Update SECURITY.md’s supported versions with the support decision.

After 1.0: an API report checked in CI.

Last updated on