Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introspectionResult is undefined #16

Open
benjick opened this issue Dec 16, 2019 · 0 comments
Open

introspectionResult is undefined #16

benjick opened this issue Dec 16, 2019 · 0 comments

Comments

@benjick
Copy link

benjick commented Dec 16, 2019

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant