Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'graphile behavior debug' and fix issue with badly scoped behaviors #410

Merged
merged 11 commits into from
Jul 14, 2023

Conversation

benjie
Copy link
Member

@benjie benjie commented Jul 13, 2023

Fixes #409

The new command graphile behavior debug <entityType> <entityIdentifier> [filterString] helps you to figure out why a particular entity (table, column, etc) does/does not match a particular filter string. Not 100% accurate to all possible filter strings but still incredibly useful for 95% of situations.

image

benjie added 11 commits July 13, 2023 13:43
In the past two weeks I added a few behavior strings like
`array:attribute:filterBy` (a scoped form of `attribute:filterBy` to only be
used by attributes that were arrays); however I've realised that this will
require plugin authors to implement all the same logic to figure out what type
an attribute is in order to then see if it has the relevant behavior. This goes
against the design of the behavior system, and makes plugin authors' lives
harder. So I've reverted this, and instead used the `entityBehaviors` system to
add or remove the base `attribute:filterBy` (etc) behavior depending on what
the type of the attribute is.
@benjie benjie merged commit ae2315e into planning Jul 14, 2023
1 check passed
@benjie benjie deleted the fix-behaviors branch July 14, 2023 11:09
@benjie benjie added this to the V5 beta milestone Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix inferred behaviors
1 participant