1.0.0 • Published 6 years ago

graphql-module-typescript-loader v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

Build Status npm semantic-release Commitizen friendly

graphql-module-typescript-loader

Webpack loader to create TypeScript declarations for .graphql Modules.

Emits TypeScript declaration files matching your .graphql Modules in the same location as your source files, e.g. src/query.graphql will generate src/query.graphql.d.ts.

Usage

Place graphql-module-typescript-loader directly after graphql-tag/loader in your webpack config.

module.exports = {
  module: {
    rules: [
      {
        test: /\.(graphql|gql)$/,
        use: [
          {
            loader: 'graphql-module-typescript-loader',
          },
          {
            loader: 'graphql-tag/loader',
          }
        ]
      },
    ]
  }
};

With Thanks

This package borrows heavily from css-modules-typescript-loader.

License

MIT.