-
-
Notifications
You must be signed in to change notification settings - Fork 796
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix GraphQLFileLoader #import syntax handling (#1808)
- Loading branch information
1 parent
7d6b1f9
commit b49acfb
Showing
6 changed files
with
56 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packages/loaders/graphql-file/tests/test-files/executable.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#import AFragment from "./fragment.graphql" | ||
|
||
query MyQuery { | ||
a { | ||
...AFragment | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/loaders/graphql-file/tests/test-files/fragment.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
fragment AFragment on A { | ||
b | ||
} |
4 changes: 2 additions & 2 deletions
4
packages/loaders/graphql-file/tests/test-files/import-me.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
type Mutation { | ||
sayGoodbye: String | ||
type A { | ||
b: String | ||
} |
4 changes: 2 additions & 2 deletions
4
packages/loaders/graphql-file/tests/test-files/type-defs-with-import.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#import Mutation from "./import-me.graphql" | ||
#import A from "./import-me.graphql" | ||
|
||
type Query { | ||
hello: String | ||
a: A | ||
} |