Closed keon closed 8 years ago
You could inject your own DefaultNetworkLayer as following:
Relay.injectNetworkLayer(
new Relay.DefaultNetworkLayer('http://localhost:3000/graphql', {
headers: {
Authorization: 'Bearer ' + token
}
})
);
Take a look at this awesome article.
How should we implement user authentification in GraphQL? Most practices I saw are RESTful (for user auth) + GraphQL (for general use)