Skip to content

Commit

Permalink
feat(GraphcoolLink): temporarily disable reportErrors Link that cause…
Browse files Browse the repository at this point in the history
…d duplicate requests (#40)

Closes graphql-boilerplates/node-graphql-server#59
  • Loading branch information
kbrandwijk authored Jan 4, 2018
1 parent ce84e10 commit 80584af
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export function makeGraphcoolLink({

const backendLink = split(op => isSubscription(op), wsLink, httpLink)

/* TODO: Fix this: this is causing duplicate requests
const reportErrors = new ApolloLink((operation, forward) => {
const observer = forward!(operation)
observer.subscribe({
Expand All @@ -46,6 +47,7 @@ export function makeGraphcoolLink({
})
return observer
})
*/

if (debug) {
const debugLink = new ApolloLink((operation, forward) => {
Expand All @@ -63,9 +65,9 @@ export function makeGraphcoolLink({
})
})

return ApolloLink.from([debugLink, reportErrors, backendLink])
return ApolloLink.from([debugLink/*, reportErrors*/, backendLink])
} else {
return ApolloLink.from([reportErrors, backendLink])
return ApolloLink.from([/*reportErrors, */backendLink])
}
}

Expand Down

0 comments on commit 80584af

Please sign in to comment.