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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ for historical context.

## Unreleased

Companion runtime/macros version: **0.63.0**.

- Seed propagated-event cycle detection with the complete typed target identity and origin so cycles cannot re-emit the direct source.
- Resolve generated upward propagation using all declared relation from/to components, independent of either entity's primary key.
- Revalidate source/target tuple witnesses and current relation-field authority before subscriber delivery; reject fanout that exceeds the remaining budget.

## 0.62.0 (unreleased)

Companion runtime/macros version: **0.62.0**.

- Add typed runtime `orderBy` to generated keyset queries and repository forward/backward reads. Whitelist persisted scalar order fields, append the complete primary-key suffix, bind dynamic cursors to the exact order, authorize all raw cursor fields, and retain existing configured cursor bytes when `orderBy` is absent.
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ 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.62.0", default-features = false }
graphql-orm = { path = "crates/graphql-orm", version = "0.63.0", default-features = false }
graphql-orm-ai-tool-profiles = { path = "crates/graphql-orm-ai-tool-profiles", version = "0.16.2" }
graphql-orm-backup = { path = "crates/graphql-orm-backup", version = "0.10.0", default-features = false }
graphql-orm-operation-catalog = { path = "crates/graphql-orm-operation-catalog", version = "0.4.2" }
Expand Down
21 changes: 21 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,27 @@ Each dynamic order appends missing primary-key columns in ascending order. NULL

Dynamic cursors bind the entity, exact ordered columns, directions and null placement. A cursor for a different order or the configured default is rejected. Omit `orderBy` to retain the configured order and existing cursor bytes. Repository callers may use `keyset_page_ordered` or `keyset_connection_page_ordered`; existing methods stay unchanged. Every composite primary-key component participates in configured and runtime validation. No schema or data migration is required.

## 0.62.0 to 0.63.0: propagation relation tuples

Upgrade runtime/macros together. `propagate_change = "up"` now resolves the
complete declared `from`/`to` arrays, including scalar-primary-key entities
related by a multi-column natural key. It no longer substitutes the child primary
key or assumes the target relation column is its primary key. Scalar relations
use the same mapped path. Every target must fit the remaining bounded fanout;
a larger fanout fails the mutation so it cannot silently notify a partial set.

A generated witness retains only typed source keys, target identity and the
complete relation mapping. At each subscriber release, current source authority,
source key and relation-field authority, every tuple component and the target
are revalidated. A relation changed since commit suppresses stale delivery.
Post-commit, rollback, provenance-hop and event budgets remain enforced. The
legacy hidden scalar witness constructor remains compatible with existing hosts.

This is a focused part of issue #191. Composite-primary-key Changed generation
and read-only trusted projection subscriptions remain separate unfinished work;
this change does not complete #191, #184 or draft #189. No data/schema migration
or downstream pin change is included.

## 0.60.0 to 0.61.0: subscription primary-key selection

Upgrade runtime/macros together. Generated single-key subscriptions gain an optional `key` argument, using the entity primary key scalar and configured argument casing. Existing operations remain valid. For example, `recordChanged(key: "…", filter: {actions: [UPDATED]})` watches one row. Key selection narrows notifications only: it never grants row, field, scope, assurance, deleted-preimage or propagated-source authority. Refresh schema/catalogue snapshots. Composite-key subscriptions remain unsupported by this change. No data or schema migration is required.
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.62.0"
version = "0.63.0"
edition = "2024"
authors = ["Toby Martin"]
description = "Procedural macros for async-graphql and ORM-backed entities, relations, and CRUD operations."
Expand Down
4 changes: 4 additions & 0 deletions crates/graphql-orm-macros/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ The scalar-only input, complete primary-key suffix, order-bound cursor and curre
field authorization are described in the
[migration guide](../../MIGRATION.md#0610-to-0620-runtime-keyset-ordering).

Version 0.63.0 resolves generated upward propagation using complete relation
from/to tuples and revalidates the current mapping at release. See the
[migration guide](../../MIGRATION.md#0620-to-0630-propagation-relation-tuples).

Version 0.61.0 adds an optional typed `key` argument to generated single-primary-key
change subscriptions, preserving current authorization and action filtering. See the
[migration guide](../../MIGRATION.md#0600-to-0610-subscription-primary-key-selection).
Expand Down

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

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

1 change: 1 addition & 0 deletions crates/graphql-orm-macros/src/entity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4765,6 +4765,7 @@ fn generate_entity_impl(
PartialEq,
)]
#aggregate_graphql_attribute
#[allow(clippy::enum_variant_names)]
pub enum #aggregate_field_name {
#(#aggregate_field_variants),*
}
Expand Down
Loading
Loading