title: Add API Key to graphql request using Apollo Client and React
body: <p>I did the guide on using GraphQL with Apollo Client and React from the Apollo website and now I want to access a GraphQL API that is protected via an API Key. I have a key but I don't know how to modify my request to use said key.</p>
  
  <pre><code>import React from 'react';
  import ReactDOM from 'react-dom';
  import './index.css';
  import { ApolloProvider } from "react-apollo";
  import ApolloClient from "apollo-boost";
  import { Query } from "react-apollo";
  import gql from "graphql-tag";
  
  const client = new ApolloClient({
      uri: "https://sample-api/graphql"
  });
  
  const GetStats = () =&gt; (
      &lt;Query
          query={gql`
        {
          player(playername:"Player1){
              statistics
          }
        }
      `}
      &gt;
          {({ loading, error, data }) =&gt; {
              if (loading) return &lt;p&gt;Loading...&lt;/p&gt;;
              if (error) return &lt;p&gt;Error :(&lt;/p&gt;;
  
              return data.rates.map(({ statistics }) =&gt; (
                  &lt;div key={statistics}&gt;
                      &lt;p&gt;{`${statistics}`}&lt;/p&gt;
                  &lt;/div&gt;
              ));
          }}
      &lt;/Query&gt;
  );
  
  const App = () =&gt; (
      &lt;div&gt;
          &lt;header&gt;New Project&lt;/header&gt;
          &lt;ApolloProvider client={client}&gt;
              &lt;div&gt;
                  &lt;h2&gt;&lt;GetStats/&gt;&lt;/h2&gt;
              &lt;/div&gt;
          &lt;/ApolloProvider&gt;
      &lt;/div&gt;
  );`enter code here`
  
  
  
  ReactDOM.render(&lt;App /&gt;, document.getElementById('root'));
  </code></pre>