Rollup GraphQL-Schema
This rollup plugin allows to fetch or parse a GraphQL Schema required by Magidoc Plugins to build your website documentation.
Install
#
Add the module to your project.
Fetching
#
Fetching a GraphQL schema performs a full GraphQL Introspection Query and stores the result on the file-system.
To use it, add the plugin to your Rollup/ViteJS
configuration. Here is an example for a vite.config.js
.
Configuration
#
Configurations are available for the plugin to change the behavior of the introspection query. Here is the full configuration example and its default values.
Parsing
#
This plugin parses one or multiple SDL files and converts them into either a single one or an introspection result. Results are stored on the file-system. This approach is usually simpler than interacting with a live endpoint if your API uses Authentication.
To use it, add the plugin to your Rollup/ViteJS
configuration. Here is an example for a vite.config.js
.
Configuration
#
Some configuration is available as well for the plugin.
GraphQL Query Generator
Introduction