From 4eda0cd572274febad696ebb5a89472a981f8212 Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Thu, 13 Jul 2023 16:50:18 +0100 Subject: [PATCH] docs(changeset): 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. --- .changeset/three-coats-exist.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .changeset/three-coats-exist.md diff --git a/.changeset/three-coats-exist.md b/.changeset/three-coats-exist.md new file mode 100644 index 000000000..d7003d42b --- /dev/null +++ b/.changeset/three-coats-exist.md @@ -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.