Skip to content

Commit

Permalink
docs(changeset): Use a single behavior check per location.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
benjie committed Jul 13, 2023
1 parent 0090836 commit 4eda0cd
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .changeset/three-coats-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
"graphile-build-pg": patch
"graphile-build": patch
"graphile-utils": patch
"postgraphile": patch
---

Use a single behavior check per location.

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.

0 comments on commit 4eda0cd

Please sign in to comment.