Skip to content
PluginStats

vite-plugin-graphql-codegen weekly downloads statistics

By danielwaltz · npm · Vite plugins

Zero-config vite plugin that uses the vite file watcher to run graphql codegen programmatically without needing to start a separate watcher

View on npm Stale · Oct 18, 2026

vite-plugin-graphql-codegen has 31,418 recorded weekly downloads on npm, a decrease of 45.0% over the past 30 days, ranking #676 of 2,322 tracked listings.

Weekly downloads
31,418
Official API · Oct 18, 2026
7-day growth
-49.2%
-30.4K weekly downloads
30-day growth
-45.0%
-25.7K weekly downloads
90-day growth
-30.0%
-13.5K weekly downloads
Rank
#676
Among tracked npm listings

About vite-plugin-graphql-codegen

Vite Plugin GraphQL Codegen npm

Zero-config vite plugin that uses the vite file watcher to run graphql codegen programmatically without needing to start a separate watcher.

Setup GraphQL Codegen

Installation instructions found here. Optional if already set up in project.

Install Plugin

# ✨ Auto-detect
npx nypm install -D vite-plugin-graphql-codegen

# vp
vp install -D vite-plugin-graphql-codegen

# npm
npm install -D vite-plugin-graphql-codegen

# yarn
yarn add -D vite-plugin-graphql-codegen

# pnpm
pnpm install -D vite-plugin-graphql-codegen

# bun
bun add -D vite-plugin-graphql-codegen

# deno
deno install -D vite-plugin-graphql-codegen

Initialize Plugin

// vite.config.ts

import { defineConfig } from "vite";
import codegen from "vite-plugin-graphql-codegen";

export default defineConfig({
  plugins: [codegen()],
});

Options

Providing options is not required as sensible defaults are in place, but there may be times where it's helpful to disable codegen under certain circumstances, like when running builds in CI.

codegen({
  /**
   * Run codegen on server start.
   *
   * @default true
   */
  runOnStart: boolean,
  /**
   * Run codegen on build. Will prevent build if codegen fails.
   *
   * @default true
   */
  runOnBuild: boolean,
  /**
   * Enable codegen integration with vite file watcher.
   *
   * @default true
   */
  enableWatcher: boolean,
  /**
   * Automatically add schemas and documents referenced in the codegen config
   * to the file watcher.
   *
   * @default true
   */
  watchCodegenConfigFiles: boolean,
  /**
   * Throw an error if codegen fails on server start.
   *
   * @default false
   */
  throwOnStart: boolean,
  /**
   * Throw an error if codegen fails on build.
   *
   * @default true
   */
  throwOnBuild: boolean,
  /**
   * Run codegen when a document matches.
   *
   * @default true
   */
  matchOnDocuments: boolean,
  /**
   * Run codegen when a schema matches.
   *
   * @default false
   */
  matchOnSchemas: boolean,
  /**
   * Manually define the codegen config.
   */
  config: CodegenConfig,
  /**
   * Override parts of the codegen config just for this plugin.
   */
  configOverride: Partial<CodegenConfig>,
  /**
   * Override parts of the codegen config just for this plugin on server start.
   */
  configOverrideOnStart: Partial<CodegenConfig>,
  /**
   * Override parts of the codegen config just for this plugin on build.
   */
  configOverrideOnBuild: Partial<CodegenConfig>,
  /**
   * Override parts of the codegen config just for this plugin in the watcher.
   */
  configOverrideWatcher: Partial<CodegenConfig>,
  /**
   * Override the codegen config file path.
   */
  configFilePathOverride: string,
  /**
   * Skip codegen for a given cycle when true.
   *
   * The callback receives the current trigger and the changed file path
   * for watcher-driven runs.
   */
  skip:
    boolean |
    ((context: { trigger: "start" | "build" | "watch"; filePath?: string }) =>
      boolean | Promise<boolean>),
  /**
   * Log various steps to aid in tracking down bugs.
   *
   * @default false
   */
  debug: boolean,
});

Description from the npm listing.

  • graphql
  • codegen
  • graphql-codegen
  • graphql-code-generator
  • vite
  • vite-plugin
  • vite-plugin-graphql-codegen

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

vite-plugin-graphql-codegen weekly downloads on npm, last 90 days: 31,418 weekly downloads as of Oct 18, 2026, -30.0% over 90 days.vite-plugin-graphql-codegenWeekly downloads on npm · Last 90 days31,418downloads / week-30.0% over 90 days20K30K40K50K60K70KJul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 23, 2026 – Oct 18, 2026 · 88 observations · Updated Oc…pluginstats.com
vite-plugin-graphql-codegen weekly downloads on npm, last 90 days: 31,418 weekly downloads as of Oct 18, 2026, -30.0% over 90 days.

7/30/90-day growth

vite-plugin-graphql-codegen weekly downloads growth on npm: -49.2% over 7 days, -45.0% over 30 days, -30.0% over 90 days.vite-plugin-graphql-codegenWeekly downloads growth on npm31,418downloads / week now7-day growth-30,420 weekly downloads-49.2%30-day growth-25,714 weekly downloads-45.0%90-day growth-13,457 weekly downloads-30.0%Growth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
vite-plugin-graphql-codegen weekly downloads growth on npm: -49.2% over 7 days, -45.0% over 30 days, -30.0% over 90 days.

Ranking history

vite-plugin-graphql-codegen npm ranking history: currently #676 (by weekly downloads).vite-plugin-graphql-codegennpm ranking · by weekly downloads · Last 90 days#676current rank#674#676#678#680#682#684#686#688Jul 22Aug 6Aug 21Sep 5Sep 20Oct 5Oct 20rankOct 18, 2026 – Oct 20, 2026 · 3 observations · Updated Oct 18, 2026pluginstats.com
vite-plugin-graphql-codegen npm ranking history: currently #676 (by weekly downloads).

Listing placement

All npm2,320 listings · 116 pages · 1,162 shown · page 34, #16 (overall #676)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins253 listings · 13 pages · page 6, #8 (overall #108)
Vite plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (122)
Recent weekly downloads observations for vite-plugin-graphql-codegen
Date (UTC)Weekly downloadsChange vs. previous
31,418+3.9K
27,558-3K
30,570-2.4K
33,015-11.8K
44,779-17.5K
62,2430
62,243+405
61,838+197
61,641+694
60,947+7.9K
53,070+2.2K
50,852+7.5K
43,385-12.6K
55,979—

Similar npm Vite plugins plugins

All 20 vite-plugin-graphql-codegen alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/vite-plugin-graphql-codegen. First seen Oct 16, 2026; last successful collection Oct 20, 2026. See the methodology.