-
-
Notifications
You must be signed in to change notification settings - Fork 114
Parse all schemas as one Document #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@joffrey-bion some tests are failing. Could you please take a look? |
src/main/java/com/kobylynskyi/graphql/codegen/GraphqlDocumentParser.java
Outdated
Show resolved
Hide resolved
|
Yes, I'm fixing the tests. I'll actually make a second PR for the removal of the |
Codecov Report
@@ Coverage Diff @@
## master #28 +/- ##
============================================
+ Coverage 87.16% 87.33% +0.16%
- Complexity 217 220 +3
============================================
Files 29 29
Lines 522 529 +7
Branches 73 74 +1
============================================
+ Hits 455 462 +7
Misses 44 44
Partials 23 23
Continue to review full report at Codecov.
|
|
I've made a separate PR, please take a look: #29 This one is based on the 29, so the diff will get cleaner when the other one is merged. |
|
Awesome, thank you. #29 was merged. |
This makes use of the MultiSourceReader provided by the graphQL library. Using this reader allows to read a single document from multiple files, while correctly associating line numbers and errors to their original source file. This doesn't bring any overhead because the method Parser.parseDocument(String) that was previously used already created a MultiSourceReader itself. Note that the previous method didn't associate the source file name with the content used for parsing, while the new one does. It allows to solve cross-reference problems with union types for instance. Resolves: #27
|
I added the requested change. Please don't hesitate to add any other comment. |
|
@joffrey-bion thank you so much for the contribution. |
|
@kobylynskyi Well, thanks to you for being so quick to review, merge and release! |
This makes use of the MultiSourceReader provided by the graphQL library.
Using this reader allows to read a single document from multiple files,
while correctly associating line numbers and errors to their original
source file.
This doesn't bring any overhead because the method Parser.parseDocument(String) that was previously used already created a MultiSourceReader itself.
Note that the previous method didn't associate the source file name with the content used for parsing, while the new one does.
It allows to solve cross-reference problems with union types for instance.
Resolves:
#27