babel-plugin-import-graphql
babel-plugin-import-graphql copied to clipboard
Parse schema files to AST
Maybe I'm missing something, but, currently there's no babel plugin which understands graphql extensions (.gql
or .graphql
) and parsers to AST schema definitions.
I see here https://github.com/detrohutt/babel-plugin-import-graphql/blob/master/plugin/requireGql.js#L16 that this plugin when detects is an schema file and not with operations it skips the parsing to AST.
Would it be great if I could use the same plugin for schema and operations as .graphql
files and not loosing the parsing to AST feature.