title: React JS with Apollo GraphQL Subscriptions
body: <p>Hi I'm trying to implement subscriptions in apollo with an auth header. I keep running into issues where Im getting CORS errors.</p>
  
  <p>Seems to be no way to do this.</p>
  
  <p>Here's a trimmed down version of my alteration of your code:</p>
  
  <pre><code>const httpLink = new HttpLink({
    uri: "http://localhost:4444/graphql",
    fetchOptions: {
      credentials: "include"
    },
    request: operation =&gt; {
      const token = localStorage.getItem("token");
      operation.setContext({
        headers: {
          Authorization: "Bearer " + token
        }
      });
    },
    onError: ({ networkError }) =&gt; {
      if (networkError) {
        console.log("Network Error:::", networkError);
      }
    }
  });
  
  const wsLink = new WebSocketLink({
    uri: ws://localhost:4444/subscriptions,
    options: {
      reconnect: true
    }
  });
  
  const link = split(
    ({ query }) =&gt; {
      const { kind, operation } = getMainDefinition(query);
      return kind === "OperationDefinition" &amp;&amp; operation === "subscription";
    },
    wsLink,
    httpLink
  );
  </code></pre>
  
  <p>*Note I am trying to implement with auth</p>