Neocon Propaganda Machine

    @pp-spaces/laravel-mix-graphql

    0.0.3 • Public • Published

    Laravel Mix GraphQL Extension

    Downloads Release License

    A Laravel Mix extension for GraphQL support for Webpack.

    Installation

    yarn add -D @pp-spaces/laravel-mix-graphql

    or

    npm install @pp-spaces/laravel-mix-graphql --save-dev

    Laravel Mix Configuration

    In your webpack.mix.js, import @pp-spaces/laravel-mix-graphql:

    // webpack.mix.js
    
    const mix = require("laravel-mix");
    
    /**
     * Import laravel-mix-graphql
     */
    require("@pp-spaces/laravel-mix-graphql");
    
    /**
     * Register loader
     */
    mix
      .js("resources/js/app.js", "public/js")
      .sass("resources/sass/app.scss", "public/css")
      .graphql();

    Done!, re-run your compile command.

    Usage

    Within your project, e.g. app.js, you can import .graphql or .gql schema directly.

    // app.js
    
    import UserQuery from "./graphql/UserQuery.graphql";

    Author

    Socheat, Web Developer

    Twitter Follow

    Install

    npm i @pp-spaces/laravel-mix-graphql

    DownloadsWeekly Downloads

    180

    Version

    0.0.3

    License

    MIT

    Unpacked Size

    4.06 kB

    Total Files

    5

    Last publish

    Collaborators

    • andrewalex