Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/r0man/alumbra.printer
A pretty printer for the Alumbra AST
https://github.com/r0man/alumbra.printer
alumbra clojure clojurescript graphql
Last synced: about 2 months ago
JSON representation
A pretty printer for the Alumbra AST
- Host: GitHub
- URL: https://github.com/r0man/alumbra.printer
- Owner: r0man
- License: mit
- Created: 2018-12-20T15:33:33.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-19T21:51:05.000Z (about 5 years ago)
- Last Synced: 2024-10-13T10:25:24.031Z (3 months ago)
- Topics: alumbra, clojure, clojurescript, graphql
- Language: Clojure
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
* alumbra.printer
:PROPERTIES:
:CUSTOM_ID: alumbra.printer
:END:[[https://clojars.org/r0man/alumbra.printer][https://img.shields.io/clojars/v/r0man/alumbra.printer.svg]]
[[https://travis-ci.org/r0man/alumbra.printer][https://travis-ci.org/r0man/alumbra.printer.svg]]
[[https://versions.deps.co/r0man/alumbra.printer][https://versions.deps.co/r0man/alumbra.printer/status.svg]]
[[https://versions.deps.co/r0man/alumbra.printer][https://jarkeeper.com/r0man/alumbra.printer/downloads.svg]]A pretty printer for the [[https://github.com/alumbra][Alumbra]] AST.
** Usage
:PROPERTIES:
:CUSTOM_ID: usage
:END:Parse a GraphQL document.
#+BEGIN_SRC clojure :exports code :results silent
(require '[alumbra.parser :as parser])
(require '[alumbra.printer :as printer])(def my-document
(parser/parse-document "{ human(id: \"1000\") { name height(unit: FOOT) } }"))
#+END_SRCPrint the document.
#+BEGIN_SRC clojure :exports both :results output
(printer/print my-document)
#+END_SRC#+RESULTS:
: query { human(id: "1000") { name height(unit: FOOT) } }Pretty print the document.
#+BEGIN_SRC clojure :exports both :results output
(printer/pprint my-document)
#+END_SRC#+RESULTS:
: query {
: human(id: "1000") {
: name
: height(unit: FOOT)
: }
: }** License
:PROPERTIES:
:CUSTOM_ID: license
:END:MIT License, Copyright (c) 2019 [[https://github.com/r0man][r0man]]