Skip to content

Commit 4bb366f

Browse files
committed
README.md
1 parent cffc105 commit 4bb366f

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ GraphQL language support for [WebStorm](https://www.jetbrains.com/webstorm/), [I
1111
* [How to use](#how-to-use)
1212
* [Configuration](#configuration)
1313
* [Basic configuration](#basic-configuration)
14+
* [Composite schema](#composite-schema)
1415
* [Remote schemas](#remote-schemas)
1516
* [Local introspection schemas](#local-introspection-schemas)
1617
* [Advanced configuration](#advanced-configuration)
@@ -90,6 +91,8 @@ Language (often abbreviated as SDL). If you're authoring your schemas in SDL, th
9091

9192
# Configuration
9293

94+
> GraphQL Config docs could be found [here](https://the-guild.dev/graphql/config/docs).
95+
9396
By default, the plugin assumes that your project contains a single schema. If this is the case, you don't need to perform any actions in
9497
terms of schema discovery. For a single-schema project, schema types are discovered as follows: All `.graphql` files in the `Project files`
9598
scope are processed for type definitions, which are added to a singleton type registry. If the IDE has JavaScript language support, injected
@@ -124,6 +127,29 @@ definitions.
124127
Please note that paths are relative to the config directory, unless they are explicitly defined as absolute. Therefore, you do not need to
125128
prefix them with `./`. Just `schema.graphql` is sufficient. The same applies to glob patterns.
126129

130+
## Composite schema
131+
132+
GraphQL Config can also assemble multiple modularized schemas into a single GraphQL schema object.
133+
134+
You can specify a list of files:
135+
136+
```yaml
137+
schema:
138+
- ./foo.graphql
139+
- ./bar.graphql
140+
- ./baz.graphql
141+
```
142+
143+
Alternatively, you can use a glob pattern to find and include pieces of schema:
144+
145+
```yaml
146+
schema: ./*.graphql # includes every GraphQL file in current directory
147+
# OR
148+
schema: ./**/*.graphql # includes GraphQL files recursively
149+
```
150+
151+
GraphQL Config looks for those files, reads the files and merges them to produce a GraphQL schema object.
152+
127153
## Remote schemas
128154

129155
If you have a GraphQL endpoint and do not have the local schema file yet, you can define one or more endpoints and make an introspection

0 commit comments

Comments
 (0)