Introspection

Introspection plugin for Prisma. This plugin allows you to introspect your database and generate a Prisma schema from it.

Version
7.0.0
Weekly downloads
1.9M
License
MIT
Updated
Nov 7, 2026

Installation

          npm i -D @graphql-codegen/introspection
        

Config API Reference

minify

type: boolean

Set to true in order to minify the JSON output. Default value: “false”

Usage Examples

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;

descriptions

type: boolean

Whether to include descriptions in the introspection result. Default value: “true”

specifiedByUrl

type: boolean

Whether to include specifiedByUrl in the introspection result. Default value: “false”

directiveIsRepeatable

type: boolean

Whether to include isRepeatable flag on directives. Default value: “true”

schemaDescription

type: boolean

Whether to include description field on schema. Default value: “false”

federation

type: boolean