-
Notifications
You must be signed in to change notification settings - Fork 467
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
Initial work on a new flow target #296
Merged
Merged
Conversation
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
- Use Flow exact object types - Add description comments - Upgrade flow printer to babel 7
This reverts commit 49c50ca.
@martijnwalraven this branch is getting pretty big so I'd love to commit this work to master before continuing work on this new flow target. It'll be accessible via a different target name "flow-modern". I did some minor changes to the CLI, please double check those! cc @dquang-tran who helped out with some of this work |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This new flow target uses babel 7 nodes to generate the resulting code. As a result, it does not extend the existing CodeGenerator.
Not having to print strings allows the code to be a little bit cleaner and makes managing the typescript target easier too.
New current defaults (subject to potential change depending on discussion):
nested
types__generated__
folder co-located by defaultimport { MyQuery_hero } from './__generated__/MyQuery' than
import { MyQuery_hero } from '../../../../types/graphql_operations`Organizationally, I've decided to co-locate tests in
__tests__
folders. Not married to this but I found it easier to work with.Still TODO:
exact objects
The new typescript target will require few changes from the flow target code (i've tried this already, but don't want to submit it along with the flow target until it's complete)