-
Notifications
You must be signed in to change notification settings - Fork 221
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
AST separation #777
AST separation #777
Conversation
b9465d2
to
7724189
Compare
- Move `AstLocation`, `OperationType` and `QueryAst.scala` into a new `sangria-ast` module. - Move the object `ast.AstNode` to `schema.AstNodeTransformer`. - Move the `AstNode` rendering into new `QueryRenderer.renderPretty` and `QueryRenderer.renderCompact` methods. - Delete the `InputDocument.to` methods. The corresponding `InputDocumentMaterializer.to` method should be used instead.
7724189
to
0bc7074
Compare
Remove the `analyzer`, `separateOperations`, and the `separateOperation` methods from `Document`. These have no place in a concrete syntax tree representation. Move `SourceMapper.scala` into the `ast` package. `SourceMapper` includes methods that return localized strings (error messages), but those can be removed later. This is the easiest way not to disrupt the API too much. Fix the tests to work with the previous commit. Add type annotations, restrict member visibilities, documentation. Clean up IDE and build warnings.
...les/benchmarks/src/main/scala/sangria/benchmarks/OverlappingFieldsCanBeMergedBenchmark.scala
Show resolved
Hide resolved
I'll try to use a snapshot later to check how important the breaking changes are. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've opened a PR with some suggestions: performantdata#3
Also fix warning.
performantdata#3 is cherry-picked. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking better & better! 👍
How/when does the CHANGELOG get updated? |
This should be added to the milestone. @yanns |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
Can you please remove the references to other libraries? Thanks!
manually, when we can. |
Co-authored-by: Yann Simon <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
This change breaks some projects: #795 |
This involves separating the AST code into its own published module. Deprecation of what we throw away or change in the API should happen in a new 2.x branch, if desired.
This PR will help solve #461 and #466.