title: How to fetch from graphql server using XMLHttpRequest?
body: <h3>How I can get response from graphql server using pure js without libraries?</h3>
  
  <p>For example how I can do that using <code>XMLHttpRequest</code>?
  Query and serverUrl are below:</p>
  
  <pre><code>const serverUrl = 'http://example.com/graphql/'
  const query = {
      query: `{
          viewer {
              date
          }
      }`
  };
  </code></pre>