File tree Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -13,12 +13,25 @@ yarn add --dev graphql-import-loader
1313
1414## Usage
1515
16- Resolve GraphQL file import statements as a string. See the tests for more details
16+ Resolve GraphQL file import statements with relative paths. See the tests for more details
17+
18+ ```
19+ .
20+ ├── src
21+ │ ├── index.js
22+ │ └── schema
23+ │ ├── a.graphql
24+ │ ├── b.graphql
25+ │ ├── main.graphql
26+ │ └── subdir
27+ │ └── cd.graphql
28+ └── webpack.config.js
29+ ```
1730
1831``` graphql
19- # import { A } from 'src/schema /a.graphql'
20- # import { B } from 'src/schema /b.graphql'
21- # import { C, D } from 'src/schema /cd.graphql'
32+ # import { A } from '. /a.graphql'
33+ # import { B } from '. /b.graphql'
34+ # import { C, D } from './subdir /cd.graphql'
2235
2336type Complex {
2437 id : ID !
@@ -30,7 +43,7 @@ type Complex {
3043```
3144
3245```js
33- import typeDefs from './schema .graphql'
46+ import typeDefs from './schema /main .graphql'
3447```
3548
3649```js
You can’t perform that action at this time.
0 commit comments