@graphql-codegen/introspection

  • Version 4.0.3
  • Published
  • 7.26 kB
  • 3 dependencies
  • MIT license

Install

npm i @graphql-codegen/introspection
yarn add @graphql-codegen/introspection
pnpm add @graphql-codegen/introspection

Overview

GraphQL Code Generator plugin for generating an introspection JSON file for a GraphQLSchema

Index

Variables

variable plugin

const plugin: PluginFunction<IntrospectionPluginConfig>;

    variable validate

    const validate: PluginValidateFn<any>;

      Interfaces

      interface IntrospectionPluginConfig

      interface IntrospectionPluginConfig {}
      • This plugin generates a GraphQL introspection file based on your GraphQL schema.

      property descriptions

      descriptions?: boolean;
      • Whether to include descriptions in the introspection result. true

      property directiveIsRepeatable

      directiveIsRepeatable?: boolean;
      • Whether to include isRepeatable flag on directives. true

      property federation

      federation?: boolean;

        property minify

        minify?: boolean;
        • Set to true in order to minify the JSON output. false

          import type { CodegenConfig } from '@graphql-codegen/cli';
          const config: CodegenConfig = {
          schema: 'https://localhost:4000/graphql',
          documents: ['src/**\/*.tsx'],
          generates: {
          'introspection.json': {
          plugins: ['introspection'],
          config: {
          minify: true
          },
          },
          },
          };
          export default config;

        property schemaDescription

        schemaDescription?: boolean;
        • Whether to include description field on schema. false

        property specifiedByUrl

        specifiedByUrl?: boolean;
        • Whether to include specifiedByUrl in the introspection result. false

        Package Files (1)

        Dependencies (3)

        Dev Dependencies (0)

        No dev dependencies.

        Peer Dependencies (1)

        Badge

        To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

        You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@graphql-codegen/introspection.

        • Markdown
          [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@graphql-codegen/introspection)
        • HTML
          <a href="https://www.jsdocs.io/package/@graphql-codegen/introspection"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>