From 482796ac6c49a504d57e140a6b25ff6882e1a172 Mon Sep 17 00:00:00 2001 From: Matt Campbell Date: Thu, 23 May 2019 09:50:27 -0400 Subject: [PATCH] Allow modification to GRAPHQL_ENDPOINT --- client/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/index.js b/client/index.js index b500ee4..c2becc1 100644 --- a/client/index.js +++ b/client/index.js @@ -35,9 +35,13 @@ export function initialize(config = {}) { let terminatingLink; + // Allow GRAPHQL_ENDPOINT to be changed + if (config.httpLinkOptions && !config.httpLinkOptions.url) { + config.httpLinkOptions.url = GRAPHQL_ENDPOINT; + } + // We define the HTTP Link const httpLink = new HttpLink({ - uri: GRAPHQL_ENDPOINT, ...(config.httpLinkOptions || {}), });