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

DOC Add graphql rebuild section #193

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions en/04_Changelogs/4.13.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down Expand Up @@ -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}
Copy link
Member

@GuySartorelli GuySartorelli Mar 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### GraphQL v4 additional fallback {#graphql-v4-additional-fallback}
### GraphQL v4 additional fallback

I won't hold back merging for this, but as I've mentioned a few times before you don't need to add the anchor if it's identical to the default anchor. Applies to the one below as well.


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.