From 413897503d3d65cf5046032347d15795065f8250 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Mon, 30 May 2022 12:12:04 +1200 Subject: [PATCH] DOCS Correct references to graphql v4 schema build dir --- .../00_Server_Requirements.md | 18 ++++++++++++------ .../03_building_the_schema.md | 2 +- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/docs/en/00_Getting_Started/00_Server_Requirements.md b/docs/en/00_Getting_Started/00_Server_Requirements.md index 816746693..455cc72e0 100644 --- a/docs/en/00_Getting_Started/00_Server_Requirements.md +++ b/docs/en/00_Getting_Started/00_Server_Requirements.md @@ -92,14 +92,20 @@ also needs write access for the webserver user to the following locations: [Manifests](/developer_guides/execution_pipeline/manifests), [Object Caching](/developer_guides/performance/caching) and [Partial Template Caching](/developer_guides/templates/partial_template_caching). See [Environment Management](/getting_started/environment_management). +* `.graphql-generated`: silverstripe/graphql version 4 introduces this directory. This is where your schema is + stored once it has been built. Best practice is to create it ahead of time, but if the directory doesn't exist + and your project root is writable, the graphql module will create it for you. + +[info] +If you are still using silverstripe/graphql 3.x, you do not need the `.graphql-generated` directory. +[/info] If you aren't explicitly [packaging](#building-packaging-deployment) your Silverstripe CMS project during your deployment process, additional write access may be required to generate supporting files on the fly. This is not recommended, because it can lead to extended execution times as well as cause inconsistencies between multiple server environments when manifest and cache storage isn't shared between servers. -Note that permissions may be required for other directories for specific functionality - for example graphql v4 requires -write access to the special `.graphql-generated` directory by default, and if you use the +Note that permissions may be required for other directories for specific functionality - for example if you use the [i18nTextCollector](api:SilverStripe\i18n\TextCollection\i18nTextCollector) you will need to provide write access to the relevant i18n `lang` directories. @@ -162,10 +168,10 @@ noisy, here's some pointers for auto-generated files to trigger and include in a * `public/_resources/`: Frontend assets copied from the (inaccessible) `vendor/` folder via [silverstripe/vendor-plugin](https://github.com/silverstripe/vendor-plugin). See [Templates: Requirements](/developer_guides/templates/requirements#exposing-assets-webroot). -* `.graphql/` and `public/_graphql/`: Schema and type definitions required by CMS and any GraphQL API endpoint. - Generated through - [silverstripe/graphql v4](https://github.com/silverstripe/silverstripe-graphql). Triggered by `dev/build`, or - a [GraphQL Schema Build](/developer_guides/graphql/getting_started/building_the_schema). +* `.graphql-generated/` and `public/_graphql/`: Schema and type definitions required by CMS and any GraphQL API endpoint. + Generated by + [silverstripe/graphql v4](https://github.com/silverstripe/silverstripe-graphql). See + [GraphQL Schema Build](/developer_guides/graphql/getting_started/building_the_schema). * Various recipes create default files in `app/` and `public/` on `composer install` and `composer update` via [silverstripe/recipe-plugin](https://github.com/silverstripe/recipe-plugin). diff --git a/docs/en/02_Developer_Guides/19_GraphQL/01_getting_started/03_building_the_schema.md b/docs/en/02_Developer_Guides/19_GraphQL/01_getting_started/03_building_the_schema.md index acd11ef68..fd21c512c 100644 --- a/docs/en/02_Developer_Guides/19_GraphQL/01_getting_started/03_building_the_schema.md +++ b/docs/en/02_Developer_Guides/19_GraphQL/01_getting_started/03_building_the_schema.md @@ -89,7 +89,7 @@ Though it doesn't contain any highly sensitive data, we recommend you block this ### Viewing the generated code -By default, the generated code is placed in the `.graphql/` directory in the root of your project. +By default, the generated code is placed in the `.graphql-generated/` directory in the root of your project. It is not meant to be accessible through your webserver (which is ensured by dot-prefixing) and keeping it outside of the `public/` webroot.