Creates a snapshot of the Gatsby GraphQL schema by saving minimal type definitions to a file and re-creating the schema from the snapshot during bootstrap. It adds the @dontInfer directive to all top-level types, effectively locking down the schema for production stability. Version 4.16.0 requires Gatsby v5.0.0-next as a peer dependency. This plugin is part of the Gatsby monorepo and is updated alongside Gatsby releases. It is intended for projects that want to prevent schema changes from being introduced unexpectedly, offering control via include/exclude lists and an optional update flag. The plugin is stable but rarely updated independently.
No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
This is a Gatsby plugin, not a direct import. It is used in gatsby-config.js as a CommonJS require. ESM import is not supported for config.
Options must be passed inside the plugin configuration object with a 'resolve' key. The short string form does not accept options.
The 'update' option expects a boolean, not a string. It is recommended to use an environment variable like process.env.GATSBY_UPDATE_SCHEMA_SNAPSHOT to control updates.
Configures the plugin in gatsby-config.js to lock the GraphQL schema, excluding types from a specific source plugin, and enabling updates via an environment variable.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.