Skip to content
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

babel plugin: refactor printer to use ast nodes not strings #306

Closed

Conversation

josephsavona
Copy link
Contributor

GraphQLPrinter previously worked by concatenating strings, which makes composition and reusing functions much harder (see #297 for the workarounds that this required - bc a string may represent a literal value or some already printed code). This refactors the printer to use babel's builder functions, so that print* functions all return JavaScript AST nodes.

@yungsters
Copy link
Contributor

💰 in the 🏦 !

@sebmck
Copy link

sebmck commented Sep 14, 2015

using an AST instead of strings

YES

josephsavona added a commit that referenced this pull request Sep 18, 2015
Summary: `GraphQLPrinter` previously worked by concatenating strings, which makes composition and reusing functions much harder (see #297 for the workarounds that this required - bc a string may represent a literal value *or* some already printed code). This refactors the printer to use babel's builder functions, so that `print*` functions all return JavaScript AST nodes.
Closes #306

Reviewed By: @yungsters

Differential Revision: D2438530
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants