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 Fresh · Dec 6, 2026

vite-plugin-graphql-codegen has 60,931 recorded weekly downloads on npm, a decrease of 1.5% over the past 30 days, ranking #730 of 3,247 tracked listings.

Weekly downloads
60,931
Official API · Dec 5, 2026
7-day growth
+6.5%
+3.7K weekly downloads
30-day growth
-1.5%
-916 weekly downloads
90-day growth
+11.9%
+6.5K weekly downloads
Rank
#730
▲ 3 in 7 days

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: 60,931 weekly downloads as of Dec 5, 2026, +11.9% over 90 days.vite-plugin-graphql-codegenWeekly downloads on npm · Last 90 days60,931downloads / week+11.9% over 90 days020K40K60K80K100KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
vite-plugin-graphql-codegen weekly downloads on npm, last 90 days: 60,931 weekly downloads as of Dec 5, 2026, +11.9% over 90 days.

7/30/90-day growth

vite-plugin-graphql-codegen weekly downloads growth on npm: +6.5% over 7 days, -1.5% over 30 days, +11.9% over 90 days.vite-plugin-graphql-codegenWeekly downloads growth on npm60,931downloads / week now7-day growth+3,692 weekly downloads+6.5%30-day growth-916 weekly downloads-1.5%90-day growth+6,497 weekly downloads+11.9%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
vite-plugin-graphql-codegen weekly downloads growth on npm: +6.5% over 7 days, -1.5% over 30 days, +11.9% over 90 days.

Ranking history

vite-plugin-graphql-codegen npm ranking history: currently #730 (by weekly downloads).vite-plugin-graphql-codegennpm ranking · by weekly downloads · Last 90 days#730current rank#640#660#680#700#720#740#760Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
vite-plugin-graphql-codegen npm ranking history: currently #730 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 37, #10 (overall #730)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins300 listings · 15 pages · page 7, #7 (overall #127)
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 (170)
Recent weekly downloads observations for vite-plugin-graphql-codegen
Date (UTC)Weekly downloadsChange vs. previous
60,931+536
60,395+2.1K
58,262+2.1K
56,164-1.2K
57,371+1.2K
56,132-1.5K
57,637+398
57,239-1K
58,242-2.8K
61,032-4.5K
65,495-2K
67,493-1.7K
69,237-1.2K
70,477—

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 Dec 6, 2026. See the methodology.