From e66d1ec1601deebcd91de2535c46924f2a18bddf Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 7 Nov 2018 06:51:14 +0100 Subject: [PATCH] Master App Url at global context --- TopSpace/Login.js | 6 ++---- index.html | 5 ++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/TopSpace/Login.js b/TopSpace/Login.js index 39013d97f..e39f74229 100644 --- a/TopSpace/Login.js +++ b/TopSpace/Login.js @@ -21,8 +21,6 @@ function newLogin() { container.isDraggeable = false; container.isClickeable = true; - const MASTER_APP_API = 'https://app-api.advancedalgos.net/graphql'; - let currentLabel; let userAuthorization; @@ -52,7 +50,7 @@ function newLogin() { const apolloClient = new Apollo.lib.ApolloClient({ networkInterface: Apollo.lib.createNetworkInterface({ - uri: MASTER_APP_API, + uri: window.canvasApp.graphQL.masterAppApiUrl, transportBatching: true, }), connectToDevTools: true, @@ -104,7 +102,7 @@ function newLogin() { } const networkInterfaceTeams = Apollo.lib.createNetworkInterface({ - uri: MASTER_APP_API + uri: window.canvasApp.graphQL.masterAppApiUrl }); networkInterfaceTeams.use([{ diff --git a/index.html b/index.html index 0c711fc40..3fcfe9890 100644 --- a/index.html +++ b/index.html @@ -16,7 +16,10 @@ executingAt: 'Master App', visible: true, topMargin: 85, - urlPrefix: 'http://localhost:1337/' /* 'http://localhost:1337/' */ /* 'https://develop.advancedalgos.net/' */ + urlPrefix: 'http://localhost:1337/', /* 'http://localhost:1337/' */ /* 'https://develop.advancedalgos.net/' */ + graphQL: { + masterAppApiUrl: 'https://app-api.advancedalgos.net/graphql' + } }; loadAdvancedAlgosPlatform();