graphql-module-typescript-loader
v1.0.0
Published
Webpack loader to create TypeScript declarations for .graphql file module
Downloads
5
Maintainers
Readme
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.