In the same vein as babel-plugin-graphql-tag, graphql-ppx could output a GraphQL DocumentNode.
In my mind, this has a few benefits:
- Eliminates the runtime bundle download and execution cost of including
graphql, while not the largest dependency out there, is non-zero at 166.1 kB minified and 39.7kB minified + gzipped
- Should have faster module evaluation if outputting
var documentNode = JSON.parse("<minified_ast>")