From 8a436160caadd1741669179235610152e4e8935b Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Thu, 23 Mar 2023 11:02:52 +1300 Subject: [PATCH] DOC Add graphql rebuild section --- en/04_Changelogs/4.13.0.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/en/04_Changelogs/4.13.0.md b/en/04_Changelogs/4.13.0.md index f90a1eea1..351502abf 100644 --- a/en/04_Changelogs/4.13.0.md +++ b/en/04_Changelogs/4.13.0.md @@ -9,6 +9,8 @@ title: 4.13.0 (unreleased) - [API changes](#api-changes) - [Deprecated API (by module, alphabetically)](#api-deprecated) - [Features and enhancements](#features-and-enhancements) + - [GraphQL v4 additional fallback](#graphql-v4-additional-fallback) + - [Other features and enhancements](#other-features-and-enhancements) ## API changes {#api-changes} @@ -75,4 +77,16 @@ If you are using this release as a step towards upgrading to Silverstipe CMS 5, ## Features and enhancements +### GraphQL v4 additional fallback {#graphql-v4-additional-fallback} + +For `silverstripe/graphql` v4 an additional fallback has been added to rebuild the schema if a file is missing. There is a configurable minimum interval between this type of rebuild occuring, which is set to 15 minutes by default. This type of rebuild can also be disabled via configuration. These configuration options are available on [`SilverStripe\GraphQL\Schema\Storage\AbstractTypeRegistry`](api:SilverStripe\GraphQL\Schema\Storage\AbstractTypeRegistry). + +```yml +SilverStripe\GraphQL\Schema\Storage\AbstractTypeRegistry: + rebuild_on_missing_schema_file: true + rebuild_on_missing_schema_file_minimum_interval: 900 +``` + +### Other features and enhancements {#other-features-and-enhancements} + - There is a new [`Environment::hasEnv()`](api:SilverStripe\Core\Environment::hasEnv()) method which will tell you if a given environment variable has been set. This is useful because [`Environment::getEnv()`](api:SilverStripe\Core\Environment::getEnv()) will return `false` if the variable hasn't been set, but it will also return `false` if the variable has been explicitly set to `false`! Now you can check which it is.