The website is customizable through different options defined in a
magidoc.mjs . The
import/export syntax and top-level
The introspection configuration object determines how Magidoc fetches the introspection schema for your API. This can be accomplished either using a live endpoint or SDL files.
Fetches the introspection schema from a live API endpoint using the introspection query.
Parses GraphQL SDL files into the introspection schema. SDL files usually use the extension
Provides the SDL in a raw string.
Disables introspection. This means that no documentation will be generated at all for GraphQL types. Only custom pages content will be generated.
The website object specifies different options for building the documentation website.
The list of available templates can be found on the templates page .
The query generation factories are used to customize query parameters in the generated queries. This is useful in the event that your API contains custom scalars, or that you want to return custom values for a type.
To know more about the extent of what is possible with
queryGenerationFactories , read the query generator documentation.
The extra-configuration used when running the dev command , allowing for live hot-reload of the preview website.