nitrogql logonitrogql

@nitrogql/rollup-plugin reference

@nitrogql/rollup-plugin is a Rollup plugin that processes GraphQL files. This package is suited for projects that use Rollup or Vite as a build tool.

Example

rollup.config.js

import nitrogql from "@nitrogql/rollup-plugin";
{
  plugins: [
    nitrogql({
      configFile: "./graphql.config.ts",
      include: ["**/*.graphql"],
    }),
  ],
};

options

options.configFile

Path to the configuration file. Relative paths are resolved relative to the project root in case of Vite, and relative to the current working directory in case of Rollup.

🚟 When omitted, no configuration file is loaded, meaning that the default configuration is used. We recommend always specifying a configuration file.

options.include

An array of glob patterns that specify the files to process.

options.exclude

An array of glob patterns that specify the files to ignore even if they match the include patterns.