@nitrogql/graphql-loader
reference
@nitrogql/graphql-loader
is a Webpack loader that processes GraphQL files. This package is suited for projects that use Webpack or Next.js as a build tool.
Example
webpack.config.js
module.exports = {
module: {
rules: [
{
test: /.graphql$/,
loader: "@nitrogql/graphql-loader",
options: {
configFile: "./graphql.config.yaml",
},
},
],
},
};
options
Currently, @nitrogql/graphql-loader
supports only one option: configFile
.
options.configFile
Path to the configuration file. Relative paths are resolved relative to Webpack's context.
🚟 When omitted, no configuration file is loaded, meaning that the default configuration is used. We recommend always specifying a configuration file.