A pretty printer for the Alumbra AST.
Parse a GraphQL document.
(require '[alumbra.parser :as parser])
(require '[alumbra.printer :as printer])
(def my-document
(parser/parse-document "{ human(id: \"1000\") { name height(unit: FOOT) } }"))Print the document.
(printer/print my-document)query { human(id: "1000") { name height(unit: FOOT) } }
Pretty print the document.
(printer/pprint my-document)query {
human(id: "1000") {
name
height(unit: FOOT)
}
}
MIT License, Copyright (c) 2019 r0man