Fork me on GitHub

@tbaldridge maybe you would want to parse Graphql to output to something that Pathom can consume


by something I mean query format


the library provides quite a few tools for caching due to its use of clojure data structure


for parsing graphql only, you can use this library


@tbaldridge Yes, GraphQL supports parameterized queries ( Lacinia fully supports this as well. In Lacinia, step one is to parse the GraphQL document into Lacinia's internal representation. Step two is to apply variables. Step three is to execute the query and generate results.


You can cache (in memory) the internal representation from step one. This shaves a small amount of time off of overall request processing time (even large queries can be parsed in maybe 2 ms).


One thing in the works for lacinia-pedestal is support for server-side queries, where the client sends the name of a query document, and the document exists on the server, and the standard interceptor stack does the exact kind of caching we're talking about.


I'm hopeful that using pre-parsed queries will not only cut down on the parse time (those 1 or 2 ms) but significantly cut down on memory thrash .... there's an awful lot of strings and maps and such when parsing!