diff --git a/docs/en/02_Developer_Guides/19_GraphQL/01_getting_started/02_configuring_your_schema.md b/docs/en/02_Developer_Guides/19_GraphQL/01_getting_started/02_configuring_your_schema.md index 49980cb8118..f7e9828ee88 100644 --- a/docs/en/02_Developer_Guides/19_GraphQL/01_getting_started/02_configuring_your_schema.md +++ b/docs/en/02_Developer_Guides/19_GraphQL/01_getting_started/02_configuring_your_schema.md @@ -78,14 +78,18 @@ relative to the project root. SilverStripe\GraphQL\Schema\Schema: schemas: default: - src: app/_graphql + src: + - app/_graphql ``` +Your `src` must be an array. This allows further source files to be merged into your schema. +This feature can be use to extend the schema of third party modules. + [info] -It is recommended that you define your sources as an array so that further source files are merged. - Otherwise, another config file could completely override part of your schema definition. +Your directory can also be a module reference, e.g. `somevendor/somemodule: _graphql` [/info] + **app/_config/graphql.yml** ```yml SilverStripe\GraphQL\Schema\Schema: @@ -94,11 +98,11 @@ SilverStripe\GraphQL\Schema\Schema: src: - app/_graphql - module/_graphql + # The next line would map to `vendor/somevendor/somemodule/_graphql` + - 'somevendor/somemodule: _graphql' ``` -[info] -Your directory can also be a module reference, e.g. `somevendor/somemodule: _graphql` -[/info] + Now, in our `app/_graphql` file, we can create YAML file definitions. diff --git a/docs/en/02_Developer_Guides/19_GraphQL/03_working_with_generic_types/05_adding_pagination.md b/docs/en/02_Developer_Guides/19_GraphQL/03_working_with_generic_types/05_adding_pagination.md index fae92d2b5c7..665c621207b 100644 --- a/docs/en/02_Developer_Guides/19_GraphQL/03_working_with_generic_types/05_adding_pagination.md +++ b/docs/en/02_Developer_Guides/19_GraphQL/03_working_with_generic_types/05_adding_pagination.md @@ -102,7 +102,7 @@ query { nodes { name } - } + } } ```