A printer?
See original GitHub issueHi,
I didn’t see a printer in the repository anywhere, something like https://github.com/graphql/graphql-js/blob/master/src/language/printer.js.
So I wrote one: https://gist.github.com/dminkovsky/b5efd2df4a13c6c89a01c5c49fbdffc8#file-graphqlprinter-java
I haven’t fully tested this. But the AST I’ve needed to print has printed correctly. Thought maybe to contribute. Are there other plans for a printer?
Regarding the implementation/style, the way it is now, it could use some double dispatch with Node
. But the big switch works. Also, I considered/attempted/aborted writing a reducing<String> visitor as in LB’s JS implementation, but the approach I took was just much simpler for me.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:14 (13 by maintainers)
Top Results From Across the Web
What is a Printer? - Computer Hope
A printer is an external hardware output device that takes the electronic data stored on a computer or other device and generates a...
Read more >Home & Office Printers | Amazon.com
Shop for inkjet, laser, wireless, all-in-one, and more best-selling printers on Amazon.com for the home, office, or business.
Read more >Shop All Printer Types and Brands - Best Buy
Shop Best Buy for a printer for your home or office. Choose from our great selection of printer types and brands.
Read more >What are printers and how do they work? - TechTarget
A printer is a device that accepts text and graphic output from a computer and transfers the information to paper, usually to standard-size,...
Read more >Printer (computing) - Wikipedia
In computing, a printer is a peripheral machine which makes a persistent representation of graphics or text, usually on paper.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
(Because I still had to go looking for this)
You can print by using the
SchemaPrinter
class.A direct jackson dependency is not an option, imho: We should add only dependencies we really need or want.