Wondering what’s next for npm?Check out our public roadmap! »

    babel-plugin-modular-graphql

    1.0.1 • Public • Published

    babel-plugin-modular-graphql

    A small transform plugin to cherry-pick GraphQL modules so you don’t have to. Basically babel-plugin-lodash for graphql.

    Getting Started

    npm install --save-dev babel-plugin-modular-graphql
    # or
    yarn add --dev babel-plugin-modular-graphql

    And add the plugin to your Babel config; it doesn't take any options.

    Example

    Imports like these:

    import { parse, Kind } from 'graphql';

    Become:

    import { parse } from "graphql/language/parser";
    import { Kind } from "graphql/language/kinds";

    Limitations

    • The plugin currently does not support require()
    • The plugin automatically generates an import-map that drills down into graphql's files. This may break if files at a depth of 1–2 change their names.

    Install

    npm i babel-plugin-modular-graphql

    DownloadsWeekly Downloads

    14

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    26.1 kB

    Total Files

    7

    Last publish

    Collaborators

    • avatar