Skip to content

inhibitIf#3038

Open
benjaie wants to merge 2 commits into
graphile:mainfrom
benjaie:inhibit
Open

inhibitIf#3038
benjaie wants to merge 2 commits into
graphile:mainfrom
benjaie:inhibit

Conversation

@benjaie
Copy link
Copy Markdown
Contributor

@benjaie benjaie commented Apr 29, 2026

Description

Add explicit inhibitIf and inhibitIfEmpty flow-control helpers to Grafast.

inhibitIf is implemented as a regular step for condition-based inhibition that
cannot be absorbed into dependency flags like inhibitOnNull. inhibitIfEmpty
adds a common helper for inhibiting null, undefined, "", empty arrays, and
objects with no keys.

Also adds tests and documentation updates for the new flow-control APIs.

Performance impact

Low. inhibitIf is an explicit step, so it is less optimizable than
inhibitOnNull, but only affects plans that opt into this behaviour.

Security impact

None.

Checklist

  • My code matches the project's code style and yarn lint:fix passes.
  • I've added tests for the new feature, and yarn test passes.
  • I have detailed the new feature in the relevant documentation.
  • I have added this feature to 'Pending' in the RELEASE_NOTES.md file (if one exists).
  • If this is a breaking change I've explained why.

@github-project-automation github-project-automation Bot moved this to 🌳 Triage in V5.0.0 Apr 29, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 29, 2026

⚠️ No Changeset found

Latest commit: 41544a8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🌳 Triage

Development

Successfully merging this pull request may close these issues.

1 participant