Skip to content

Instantly share code, notes, and snippets.

@Stradivario
Created November 14, 2020 07:07
Show Gist options
  • Save Stradivario/78ef0009685872e7f65557052e9ae621 to your computer and use it in GitHub Desktop.
Save Stradivario/78ef0009685872e7f65557052e9ae621 to your computer and use it in GitHub Desktop.
const http = ApolloLink.from([
new RetryLink({
attempts: {
max: 5,
retryIf: (error, operation: Operation) => {
logger.error(`retry to connect error: ${error.message}`);
return !!error;
},
},
delay: {
initial: 500,
jitter: true,
max: Infinity,
},
}),
new HttpLink({ uri, fetch }),
]);
const schemaOriginal = makeRemoteExecutableSchema({
schema: await introspectSchema(http),
link: http,
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment