@mocobaas/graphiql-mods

1.0.7 • Public • Published

Customized GraphiQL renderer for MocoBaaS

  1. Add <link rel="stylesheet" href="https://unpkg.com/graphiql/graphiql.min.css" /> on head
  2. Add <script type="module" src="mbaas-graphiql.js"></script> on body. Replace the src with CDN for better performance.
  3. Run the bootstrapGraphiql function
<html lang="en">
  <head>
    <style>
      body {
        padding: 0;
        margin: 0;
        min-height: 100vh;
      }
      #root {
        height: 100vh;
      }
    </style>
    <meta charset="UTF-8" />
    <meta name="viewport" content="initial-scale=1, width=device-width" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>MocoBaas - GraphiQL</title>
    <link rel="stylesheet" href="https://unpkg.com/graphiql/graphiql.min.css" />
  </head>

  <body>
    <div id="app"></div>
    <script type="module" src="mbaas-graphiql.js"></script>
    <script>
      const el = "app";
      const uri = "https://localhost:3200/graphql";
      window.onload = function () {
        bootstrapGraphiql({ el, uri });
      };
    </script>
  </body>
</html>

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.70latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.70
1.0.64
1.0.50
1.0.30

Package Sidebar

Install

npm i @mocobaas/graphiql-mods

Weekly Downloads

4

Version

1.0.7

License

ISC

Unpacked Size

9.61 MB

Total Files

4

Last publish

Collaborators

  • mocobaas