BOD-14 Functional 2 way messaging from app.

This commit is contained in:
Patrick Fic
2020-03-25 18:45:48 -07:00
parent 546d2d82b7
commit 4c35337d36
26 changed files with 591 additions and 64 deletions

View File

@@ -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 = {