Magidoc

repository·main·Indexed 43 days ago

https://github.com/magidoc-org/magidoc

A fast, customizable static documentation website generator for GraphQL schemas based on Svelte. Version 7.0.0 automates the creation of API documentation for queries, mutations, and types, offering a plugin system for infinite customization, fuzzy search via FuseJS, and support for multi-schema setups.

Tokens
28K
Snippets
109
Records
154
Agent score
54%

What's inside Magidoc

  1. What is Magidoc?

    main
    Magidoc is a JavaScript library designed to auto-generate static documentation from any GraphQL schema. It automatically creates documentation for every query, mutation, subscription, and type within your API. It is designed to be fast, customizable, and provides features like fuzzy search, SEO support, live hot-reloading during development, and advanced Markdown support for schema comments and custom pages.
  2. What is Magidoc?

    main
    Magidoc is a free, open-source static documentation website generator specifically designed for GraphQL. It provides templates and a plugin system to create searchable, highly discoverable documentation that goes beyond simple schema exploration. Unlike web IDEs (like GraphiQL) which focus on schema interaction, Magidoc is designed to present concepts, workflows, authentication mechanisms, and usage examples in a structured documentation format.
  3. Overview of Magidoc - Reverse-Schema-Mapper

    main

    The Reverse-Schema-Mapper is a library designed to perform reverse mapping of a GraphQL Schema. It provides two primary capabilities:

    1. Type Reference Discovery: Identify where specific types are used or referenced within a GraphQL Schema.
    2. Query Path Discovery: Build a reverse tree of the GraphQL Schema to determine the exact query path required to reach a specific field.

    Note: This plugin is currently under development and is not considered production-ready.

  4. Overview of Magidoc - Svelte Marked

    main

    Svelte-Marked is a markdown parser designed to render markdown directly into Svelte components. It provides built-in support for GitHub Flavored Markdown (GFM), including features like tables, lists, and raw HTML.

    Key capabilities:

    • Customization: You can overwrite individual component renderers to customize the styling of specific markdown elements.
    • Extensibility: You can register marked extensions to support advanced or custom markdown syntax.
    • Compatibility: It is compatible with any Svelte or SvelteKit application.
  5. Overview of Magidoc - Fuse GraphQL

    main
    The @magidoc/plugin-fuse-graphql library indexes GraphQL schemas into a FuseJS search engine. It achieves this by indexing every query, mutation, subscription, and type within the schema. To ensure high-quality search results, all descriptions are processed through a markdown engine to extract only the relevant text for indexing. This plugin is environment-agnostic and can be used in both browser and Node.js applications.
  6. Explore Magidoc usage examples

    main

    The examples directory provides concrete implementations of Magidoc to help you understand how to configure and build different types of documentation sites.

    Key examples include:

    • SpaceX: A template for generating a basic website based on a public SpaceX GraphQL API. This is the same template used for the official Magidoc demo website.
    • Multi-Schema: Demonstrates how to generate a Magidoc website that incorporates multiple different GraphQL schemas and how to link them together into a single, unified documentation site.
  7. Use the Magidoc CLI to generate GraphQL documentation websites

    main
    Magidoc CLI is a Node.js-based command-line application designed to generate beautiful, fully customizable documentation websites from GraphQL schemas. It serves as the primary interface for orchestrating the documentation generation process.
  8. Use @magidoc/rollup-plugin-gql-schema for GraphQL schemas

    main

    The @magidoc/rollup-plugin-gql-schema is a Rollup and ViteJS plugin designed to manage GraphQL schemas. It provides two primary capabilities:

    1. Fetching: It can fetch a GraphQL schema from a remote endpoint. You can configure the url, HTTP method, custom headers, and the desired output format.
    2. Parsing: It can parse local GraphQL schema files. It supports aggregating multiple schema parts into a single file using glob patterns or specific custom file paths.

    This plugin is compatible with both browser-based and NodeJS-based projects that utilize Rollup or ViteJS.

  9. What is the Magidoc - Fuse Markdown plugin?

    main

    The fuse-markdown plugin indexes Markdown content into a FuseJS engine.

    To enable granular searching, the plugin splits Markdown content into separate documents based on headers. Each section (the content following a header) is indexed as an individual document. This allows users to identify which specific section a search result belongs to and search for content within specific sections.