BOD-14 Functional 2 way messaging from app.
This commit is contained in:
@@ -25,17 +25,17 @@ export default class AppContainer extends Component {
|
||||
uri: process.env.REACT_APP_GRAPHQL_ENDPOINT_WS,
|
||||
options: {
|
||||
//lazy: true,
|
||||
reconnect: true
|
||||
// connectionParams: () => {
|
||||
// const token = localStorage.getItem("token");
|
||||
// if (token) {
|
||||
// return {
|
||||
// headers: {
|
||||
// authorization: token ? `Bearer ${token}` : ""
|
||||
// }
|
||||
// };
|
||||
// }
|
||||
// }
|
||||
reconnect: true,
|
||||
connectionParams: () => {
|
||||
const token = localStorage.getItem("token");
|
||||
if (token) {
|
||||
return {
|
||||
headers: {
|
||||
authorization: token ? `Bearer ${token}` : ""
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
const subscriptionMiddleware = {
|
||||
|
||||
Reference in New Issue
Block a user