File tree 1 file changed +18
-5
lines changed
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
13
13
14
14
## Usage
15
15
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
+ ```
17
30
18
31
``` 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'
22
35
23
36
type Complex {
24
37
id : ID !
@@ -30,7 +43,7 @@ type Complex {
30
43
```
31
44
32
45
```js
33
- import typeDefs from './schema .graphql'
46
+ import typeDefs from './schema /main .graphql'
34
47
```
35
48
36
49
```js
You can’t perform that action at this time.
0 commit comments