Skip to content

Commit

Permalink
Fixed issue with adding upload link as terminating link
Browse files Browse the repository at this point in the history
  • Loading branch information
theodorDiaconu committed Aug 29, 2018
1 parent ad36e38 commit 08063c2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,8 @@ export function initialize(config = {}) {
uri: GRAPHQL_ENDPOINT,
});

const uploadLink = createUploadLink();

if (meteorAccountsLink) {
links.push(concat(meteorAccountsLink, httpLink, uploadLink));
links.push(concat(meteorAccountsLink, httpLink));
} else {
links.push(httpLink);
}
Expand All @@ -67,6 +65,9 @@ export function initialize(config = {}) {

let transformedLink = Config.getLink(link);

const uploadLink = createUploadLink();
transformedLink = uploadLink.concat(transformedLink);

const client = new ApolloClient({
link: transformedLink,
cache: new InMemoryCache({
Expand Down

0 comments on commit 08063c2

Please sign in to comment.