Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
maka-io authored May 24, 2019
1 parent 1f8310b commit 324b7d5
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,14 @@ export function initialize(config = { httpLinkOptions: {} }) {

let terminatingLink;

// Allow GRAPHQL_ENDPOINT to be changed
config.httpLinkOptions.uri = (config.httpLinkOptions.uri) ? config.httpLinkOptions.uri : GRAPHQL_ENDPOINT;

// Backward compatability
if (config.uri) {
config.httpLinkOptions.uri = config.uri;
} else {
// Allow GRAPHQL_ENDPOINT to be changed
config.httpLinkOptions.uri = (config.httpLinkOptions.uri) ? config.httpLinkOptions.uri : GRAPHQL_ENDPOINT;
}

// We define the HTTP Link
const httpLink = new HttpLink({
...(config.httpLinkOptions),
Expand Down

0 comments on commit 324b7d5

Please sign in to comment.