Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gatsby-plugin-schema-snapshot

Package Overview
Dependencies
Maintainers
0
Versions
174
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-plugin-schema-snapshot

Create a snapshot of the GraphQL schema.

  • 4.14.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14K
decreased by-1.56%
Maintainers
0
Weekly downloads
 
Created
Source

gatsby-plugin-schema-snapshot

Create a snapshot of the GraphQL schema.

Saves a minimal schema to file, adds the @dontInfer directive to all top-level types, and re-creates the schema from the saved type definitions during bootstrap. Use this plugin if you intend to lock-down a project's GraphQL schema.

Options

All configuration options are optional.

{
  // Path where the type definitions will be saved to
  path: `schema.gql`,
  // include types by name, or all types owned by a plugin
  include: {
    types: [],
    plugins: [],
  },
  // exclude types by name, or all types owned by a plugin
  // by default, internal and built-in types are excluded
  exclude: {
    types: [],
    plugins: [],
  },
  // ensure all field types are included
  // don't turn this off unless you have a very good reason to
  withFieldTypes: true,
  // manually control if a saved schema snapshot should be replaced with an
  // updated version
  update: false,
}

Example

// gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: `gatsby-plugin-schema-snapshot`,
      options: {
        path: `schema.gql`,
        exclude: {
          plugins: [`gatsby-source-npm-package-search`],
        },
        update: process.env.GATSBY_UPDATE_SCHEMA_SNAPSHOT,
      },
    },
  ],
}

Keywords

FAQs

Package last updated on 06 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc