graphql-docs icon indicating copy to clipboard operation
graphql-docs copied to clipboard

introspectionResult is undefined

Open benjick opened this issue 4 years ago • 0 comments

Screenshot 2019-12-16 at 01 03 06

<html>
  <head>
    <title>Docs</title>
    <script src="https://unpkg.com/react@15/dist/react.js"></script>
    <script src="https://unpkg.com/react-dom@15/dist/react-dom.js"></script>
    <script src="https://github.com/mhallin/graphql-docs/releases/download/v0.2.0/graphql-docs.js"></script>
  </head>
  <body>
    <div id="root"></div>
    <script>
      window.onload = function()
      {
        function fetcher(query) {
          return fetch('http://localhost:3000/graphql', {
            method: 'POST',
            headers: {
              Accept: 'application/json',
              'Content-Type': 'application/json',
            },
            body: JSON.stringify({
              query: query,
            }),
          }).then(function(r) {
            return r.json();
          });
        }

        ReactDOM.render(
          React.createElement(GraphQLDocs.GraphQLDocs, { fetcher }),
          document.getElementById('root')
        );
      };
    </script>
  </body>
</html>

benjick avatar Dec 16 '19 00:12 benjick