Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,18 @@ This file is the authoritative user-facing release chronology. The former
[release-notes ledger](docs/archive/2026/graphql-orm-release-notes.md) is retained
for historical context.

## 0.28.0 - 2026-08-31
## 0.29.0 - 2026-08-31

Companion macros crate: `graphql-orm-macros` **0.28.0**.
Companion macros crate: `graphql-orm-macros` **0.29.0**.

- Added repeatable, server-defined `order_expression` declarations for safe
computed-field ordering. GraphQL clients select only direction; fixed SQL
expressions are validated at compile time and never accepted from requests.
Expressions may declare `:named` binds resolved by an entity-owned function
from GraphQL server context; raw placeholders and missing values fail closed.
- Generated entity and relation ordering appends missing primary-key columns as
ascending tie-breakers, keeping equal computed values stable across
limit/offset pages.
- Added opt-in `order_aggregate(name = "...", aggregate = "count")` on
relations. It generates a direction-only order field backed by a correlated
count over the relation's declared source and target keys.
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ cynic-parser = { version = "=0.11.2", features = ["pretty"] }
futures = "0.3"
getrandom = "0.3"
graphql-composition = "=0.12.2"
graphql-orm = { path = "crates/graphql-orm", version = "0.28.0", default-features = false }
graphql-orm = { path = "crates/graphql-orm", version = "0.29.0", default-features = false }
graphql-orm-ai-tool-profiles = { path = "crates/graphql-orm-ai-tool-profiles", version = "0.10.2" }
graphql-orm-backup = { path = "crates/graphql-orm-backup", version = "0.7.1", default-features = false }
graphql-orm-backup = { path = "crates/graphql-orm-backup", version = "0.7.2", default-features = false }
graphql-orm-operation-catalog = { path = "crates/graphql-orm-operation-catalog", version = "0.3.0" }
graphql-orm-router-protocol = { path = "crates/graphql-orm-router-protocol", version = "0.2.1" }
graphql-orm-storage = { path = "crates/graphql-orm-storage", version = "0.6.1", default-features = false }
graphql-orm-storage = { path = "crates/graphql-orm-storage", version = "0.6.2", default-features = false }
hive-router = "=0.0.87"
hive-router-config = "=0.1.10"
jsonwebtoken = { version = "=11.0.0", features = ["rust_crypto"] }
Expand Down
21 changes: 17 additions & 4 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,33 @@ supersedes: []
`graphql-orm` is distributed from GitHub only. Use a reviewed full 40-character commit in `rev`;
neither the runtime nor macros crate is published to crates.io.

## 0.27.0 to 0.28.0: computed/relation ordering and complex relation composition
## 0.27.0 to 0.29.0: computed/relation ordering and complex relation composition

Computed fields can join generated ordering without a handwritten query:

```rust
#[graphql_orm(order_expression(
name = "Duration",
expression = "finished_at - started_at"
expression = "COALESCE(finished_at, :as_of) - started_at",
parameters = "duration_order_parameters"
))]
```

The expression is trusted, backend-specific server configuration. Requests
continue to supply only `ASC` or `DESC`. Review the resulting query plan and
add an expression/index strategy where the selected backend supports one.
continue to supply only `ASC` or `DESC`. For `:named` binds, the configured
synchronous function receives `&async_graphql::Context` and returns
`async_graphql::Result<OrderExpressionParameters>`; use `SqlValue` variants for
the values. Raw `?`, `$n`, and `@Pn` placeholders are rejected. Programmatic
queries using a contextual expression call `EntityQuery::order_by_with_context`.
Generated pagination now adds missing primary-key columns as ascending
tie-breakers. Review the resulting query plan and add an expression/index
strategy where the selected backend supports one.

`SortExpression` now carries bound `values` so query rendering can number
order-expression placeholders after filter placeholders on every backend.
Handwritten parameter-free sort construction should use
`SortExpression::unbound("column ASC")`; handwritten struct literals must add
`values: Vec::new()`.

A readable relation can expose a server-generated count order without a
projection:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ schema changes explicitly.

Packages are distributed from this repository, not crates.io. Pin the reviewed
release revision, not a moving branch or tag. The current coordinated
`graphql-orm` version is 0.28.0. Replace the placeholder below with the final
`graphql-orm` version is 0.29.0. Replace the placeholder below with the final
reviewed full SHA for the release:

```toml
[dependencies]
graphql-orm = { git = "https://github.com/Dastari/graphql-orm.git", rev = "<reviewed-full-40-character-commit-sha>", version = "0.28.0", default-features = false, features = ["sqlite"] }
graphql-orm = { git = "https://github.com/Dastari/graphql-orm.git", rev = "<reviewed-full-40-character-commit-sha>", version = "0.29.0", default-features = false, features = ["sqlite"] }
```

Choose exactly the backend support needed by each service. Cargo can unify
Expand Down
8 changes: 4 additions & 4 deletions crates/graphql-orm-backup/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ This crate is a reusable backup and restore companion for applications that use

## Current Agent Handoff

- Current crate version is `0.7.1`.
- The optional ORM adapter resolves `graphql-orm` 0.24.0 from the workspace.
- Current crate version is `0.7.2`.
- The optional ORM adapter resolves `graphql-orm` 0.29.0 from the workspace.
Internal packages use workspace path dependencies and the root `Cargo.lock`.
Keep downstream applications on one reviewed monorepo revision so ORM,
backup, and storage share the same canonical source/type universe.
- `graphql-orm` owns its optional `agql-auth` integration and pins
`agql-auth` 0.16.0 at
`3bc38cd94794f1e868a9cc3a5551047b95a32105`. This crate must not enable or
`agql-auth` 0.19.0 at
`1d2e9fe2e1576105212a7b340a11abf8cad0382d`. This crate must not enable or
depend directly on application authorization.
- Applying and dry-run restore compare the manifest backend/schema hash with
the target before target checks or writes. Preserve that fail-closed
Expand Down
9 changes: 9 additions & 0 deletions crates/graphql-orm-backup/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ supersedes: []

# Changelog

## 0.7.2 - 2026-08-31

- Refreshed the package's maintained workspace handoff to the current ORM,
storage, and authorization revisions. Backup APIs, snapshot manifests,
repository layout, restore behavior, and feature defaults are unchanged.
- This patch establishes a new immutable package tag because maintained files
under the package source tree changed after 0.7.1. No schema or data
migration is required.

## 0.7.1 - 2026-08-13

- Published the maintained backup configuration catalogue, provider-neutral
Expand Down
2 changes: 1 addition & 1 deletion crates/graphql-orm-backup/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "graphql-orm-backup"
version = "0.7.1"
version = "0.7.2"
edition = "2024"
license = "MIT"
repository = "https://github.com/Dastari/graphql-orm"
Expand Down
9 changes: 9 additions & 0 deletions crates/graphql-orm-backup/MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ supersedes: []

# Migration Guide

## 0.7.1 to 0.7.2

Version 0.7.2 refreshes maintained workspace guidance and establishes a new
immutable package tag for the changed package source tree. The public API,
snapshot manifest, repository-key layout, restore preflight, persisted data,
and feature defaults are unchanged. No schema or data migration is required.
Git consumers should move every selected monorepo package to the same reviewed
full revision and regenerate `Cargo.lock`.

## 0.7.0 to 0.7.1

Version 0.7.1 publishes the maintained documentation and examples and aligns
Expand Down
4 changes: 2 additions & 2 deletions crates/graphql-orm-backup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "graphql-orm-backup"
kind: reference
status: active
owner: graphql-orm-backup-maintainers
last_reviewed: 2026-08-12
last_reviewed: 2026-08-31
review_by: 2027-02-01
supersedes: []
---
Expand Down Expand Up @@ -31,7 +31,7 @@ restore before replacing a production pin.

```toml
[dependencies]
graphql-orm-backup = { git = "https://github.com/Dastari/graphql-orm.git", rev = "<reviewed-full-40-character-commit-sha>", version = "0.7.1" }
graphql-orm-backup = { git = "https://github.com/Dastari/graphql-orm.git", rev = "<reviewed-full-40-character-commit-sha>", version = "0.7.2" }
```

The default `local` feature provides `LocalBackupRepository`. To supply only a
Expand Down
2 changes: 1 addition & 1 deletion crates/graphql-orm-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "graphql-orm-macros"
version = "0.28.0"
version = "0.29.0"
edition = "2024"
authors = ["Toby Martin"]
description = "Procedural macros for async-graphql and ORM-backed entities, relations, and CRUD operations."
Expand Down
14 changes: 9 additions & 5 deletions crates/graphql-orm-macros/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ macro/runtime versions aligned:

```toml
[dependencies]
graphql-orm = { git = "https://github.com/Dastari/graphql-orm.git", rev = "<reviewed-full-40-character-commit-sha>", version = "0.28.0", default-features = false, features = ["sqlite"] }
graphql-orm = { git = "https://github.com/Dastari/graphql-orm.git", rev = "<reviewed-full-40-character-commit-sha>", version = "0.29.0", default-features = false, features = ["sqlite"] }
```

Direct use is supported for tooling that needs the macro package:

```toml
graphql-orm-macros = { git = "https://github.com/Dastari/graphql-orm.git", rev = "<reviewed-full-40-character-commit-sha>", version = "0.28.0", default-features = false, features = ["sqlite"] }
graphql-orm-macros = { git = "https://github.com/Dastari/graphql-orm.git", rev = "<reviewed-full-40-character-commit-sha>", version = "0.29.0", default-features = false, features = ["sqlite"] }
```

The direct dependency still requires a compatible `graphql-orm` runtime in the
Expand Down Expand Up @@ -121,9 +121,13 @@ single, pageable, DataLoader, and nested bulk-preload paths.

Server-defined computed ordering uses repeatable entity-level
`graphql_orm(order_expression(name = "...", expression = "..."))`
declarations. The generated input exposes only `OrderDirection`; the fixed,
validated expression remains compile-time server configuration. Entities that
need relationship counts can add
declarations. An expression containing `:named` bind parameters also declares
`parameters = "server_function_path"`; that function returns
`OrderExpressionParameters` from the GraphQL server context. The generated
input exposes only `OrderDirection`; the fixed, validated expression and bind
names remain compile-time server configuration. Raw backend placeholders are
rejected, and generated pagination adds missing primary-key tie-breakers.
Entities that need relationship counts can add
`order_aggregate(name = "...", aggregate = "count")` to an unconditional,
readable relation; the generated correlated count uses only its declared key
mapping and target entity table. Entities that also have handwritten complex fields use
Expand Down
Loading