Repository navigation
feat: pass the model and attribute name to writable guards - #511
Merged
Merged
Conversation
jkeen
force-pushed
the
feature/writable-guard-args
branch
from
July 29, 2026 03:07
32d240f to
58a5ed7
Compare
github-actions Bot
pushed a commit
that referenced
this pull request
Jul 29, 2026
# [1.12.0](v1.11.1...v1.12.0) (2026-07-29) ### Bug Fixes * GQL name chaining ([#415](#415)) [skip ci] ([930928a](930928a)) ### Features * conditional relationships evaluate readable/writable guards per-request ([#450](#450)) ([3ed3187](3ed3187)) * pass the model and attribute name to writable guards ([#511](#511)) [skip ci] ([24a8a94](24a8a94))
Contributor
|
🎉 This PR is included in version 1.12.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
jkeen
added a commit
to jkeen/graphiti
that referenced
this pull request
Jul 30, 2026
jkeen
pushed a commit
to jkeen/graphiti
that referenced
this pull request
Jul 30, 2026
# [1.12.0](graphiti-api/graphiti@v1.11.1...v1.12.0) (2026-07-29) ### Bug Fixes * GQL name chaining ([graphiti-api#415](graphiti-api#415)) [skip ci] ([930928a](graphiti-api@930928a)) ### Features * conditional relationships evaluate readable/writable guards per-request ([graphiti-api#450](graphiti-api#450)) ([3ed3187](graphiti-api@3ed3187)) * pass the model and attribute name to writable guards ([graphiti-api#511](graphiti-api#511)) [skip ci] ([24a8a94](graphiti-api@24a8a94))
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Writable guards can now receive the model being written and the name of the guarded attribute, mirroring what readable guards have long supported at render time. This resolves the remaining piece of #481
Dispatch is arity-based, just like the readable guards: zero parameters is called as before, one receives the model, two receive both. Symbols, strings, and procs all work.
A few deliberate choices:
Fully backwards compatible: existing guards all have arity zero and dispatch identically to today.