saikat / react-apollo-starter-kit

A production-ready starter kit for making a React/Apollo application.
MIT License
186 stars 28 forks source link

Adding headers to network #17

Closed pulpfree closed 7 years ago

pulpfree commented 7 years ago

I would like to add and authentication header to sent a token to the request in your network service. Not entirely clear how I should go about, can you provide some advice on this?

Thanks, ron

pulpfree commented 7 years ago

Ok, found a solution: const networkInterface = addQueryMerging(responseMiddlewareNetworkInterface) networkInterface.use([myWare])

If this is not a best practice please advise.

Thanks, ron