graphql-ast-types
Autogenerated helper functions for generating a GraphQL AST
This project generates helpers functions from the graphql/language AST flow descriptions. It is intended to help with building a valid GraphQL AST.
Getting Started
yarn add graphql-ast-types
;
The implementation here mimics that of babel-types
. Thanks Babel team.
Usage
The following is an example of how to build a simple query with AST types.
;; const ast = t; ; /*query { foo bar}*/
In addition, method calls are validated for correctness and accompanied by is
and assert
helpers.
t; // true t; // truet; // no error t; // falset; // error
The full API can be found here.