Open jimthedev opened 8 years ago
Check this. https://github.com/arunoda/learn-redux/blob/server-side/server/graphql.js#L8
Basically, it's like wildcard. Let me know, if that's work for you. If not, let's make some changes.
I submitted a pull request allowing to add mode to options param which is somewhat related to this issue. I also advised we could actually allow options param to be fully compatible with isomorphic-fetch.
Additionally it would be nice to set the rejectUnauthorized
flag (to ignore self signed certificates in development, when doing server side rendering) which is, in node-fetch
, passed down by setting a custom agent
(an instance of https.Agent
) in the options.
To me it looks like it would be perfectly fine to simply assign the options to this._httpOptions
in this line, or am I missing something?
https://github.com/arunoda/learn-redux/blob/server-side/server/graphql.js#L8 will not work for me as I am using https://github.com/calebmer/postgraphql.
Is there a way to prevent credentials to be sent?
The fetch key is, as far as I can tell, set to 'include' without a way of overriding the value. At times during development it may be necessary to use an Access-Control-Origin of *. This will not work if credentials are sent over the wire so until we can configure the credentials value to be undefined, there is no way to work with wildcard cors.