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.

10 lines (9 loc) 320 B
import { type GraphQLSchema } from 'graphql'; type Parameters = { query?: string; method?: Method; headers?: Record<string, string>; }; export type Method = 'GET' | 'POST' | 'PUT' | 'DELETE'; export default function queryGraphQLSchema(url: string, parameters: Parameters): Promise<GraphQLSchema>; export {};