From 21f89887ea1efb356530431eb3d0699345190ec1 Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Fri, 27 Sep 2024 11:23:11 +0100 Subject: [PATCH] Note about stricter typings --- .changeset/modern-bananas-drop.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.changeset/modern-bananas-drop.md b/.changeset/modern-bananas-drop.md index 64f75a6ae..8981c1aad 100644 --- a/.changeset/modern-bananas-drop.md +++ b/.changeset/modern-bananas-drop.md @@ -12,7 +12,7 @@ removing many hacks and workarounds, and ultimately meaning that `plugin.schema.entityBehaviors` to indicate behaviors as shown in this PR - do not mod the tags directly unless they're explicitly meant to be overrides. -Technically this is a breaking change (besides the removal of the +Technically this is a significant breaking change (besides the removal of the `addBehaviorToTags()` helper) because the order in which behaviors are applied has changed, and so a different behavior might ultimately "win". This shows up in places where there is ambiguity, for example if you add `@filterable` to a @@ -26,3 +26,9 @@ on. Be sure to print your schema before and after this update and look for changes; if there are changes then you likely need to fix the relevant behaviors/smart tags. (Hopefully there's no changes for you!) + +You'll also need to change any places where you're specifying behaviors that +will be type checked; you can either cast your existing strings e.g. +`defaultBehavior: "+connection -list" as GraphileBuild.BehaviorString`, or +preferably you can specify your behaviors as an array, which should give you +auto-complete on each entry; e.g. `defaultBehavior: ["connection", "-list"]`.