UNPKG

@magidoc/rollup-plugin-gql-schema

Version:

A Rollup and ViteJS plugin that allows to parse a GraphQL Schema from a target URL and save it to a target output folder, or to parse it from the disk and convert it to a desired format.

4 lines (3 loc) 184 B
import { type GraphQLSchema } from 'graphql'; export type OutputFormat = 'sdl' | 'introspection'; export declare function convert(schema: GraphQLSchema, format: OutputFormat): string;