@@ -11,6 +11,7 @@ GraphQL language support for [WebStorm](https://www.jetbrains.com/webstorm/), [I
11
11
* [ How to use] ( #how-to-use )
12
12
* [ Configuration] ( #configuration )
13
13
* [ Basic configuration] ( #basic-configuration )
14
+ * [ Composite schema] ( #composite-schema )
14
15
* [ Remote schemas] ( #remote-schemas )
15
16
* [ Local introspection schemas] ( #local-introspection-schemas )
16
17
* [ Advanced configuration] ( #advanced-configuration )
@@ -90,6 +91,8 @@ Language (often abbreviated as SDL). If you're authoring your schemas in SDL, th
90
91
91
92
# Configuration
92
93
94
+ > GraphQL Config docs could be found [ here] ( https://the-guild.dev/graphql/config/docs ) .
95
+
93
96
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
94
97
terms of schema discovery. For a single-schema project, schema types are discovered as follows: All ` .graphql ` files in the ` Project files `
95
98
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.
124
127
Please note that paths are relative to the config directory, unless they are explicitly defined as absolute. Therefore, you do not need to
125
128
prefix them with `./`. Just `schema.graphql` is sufficient. The same applies to glob patterns.
126
129
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
+
127
153
# # Remote schemas
128
154
129
155
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