mdbook-preprocessor-graphql-playground 0.0.2

A preprocessor for mdbook to add GraphQL playgrounds.
mdbook-preprocessor-graphql-playground-0.0.2 is not a library.

mdbook-preprocessor-graphql-playground

A preprocessor for mdbook to add GraphQL playgrounds.

preview

Usage

  1. Add to book.toml:
    [preprocessor.graphql-playground]
    command = "mdbook-graphql-playground"
    renderer = ["html"]
    
    [output]
    
    [output.html]
    additional-js = ["graphql-playground-react-middleware.js", "graphql-playground.js"]
    additional-css = ["graphql-playground.css"]
    
  2. Copy assets into the book root directory:
    cp assets/graphql-playground.css <book_dir>
    cp assets/graphql-playground.js <book_dir>
    cp assets/graphql-playground-react-middleware.js <book_dir>
    cp assets/images/* <book_dir>/images/
    
  3. You may have to adjust the CSS
  4. Create query files
  5. Create a config file