Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
conflictResolver,
}: {
url: string,
region: string,
auth: AuthOptions,
complexObjectsCredentials: CredentialsGetter,
resultsFetcherLink?: ApolloLink,
conflictResolver?: ConflictResolver,
}) => {
const link = ApolloLink.from([
createLinkWithStore((store) => new OfflineLink(store)),
new ConflictResolutionLink(conflictResolver),
new ComplexObjectLink(complexObjectsCredentials),
createRetryLink(ApolloLink.from([
new CatchErrorLink(() =>new AuthLink({ url, region, auth })),
new PermanentErrorLink(createSubscriptionHandshakeLink({ url, region, auth }, resultsFetcherLink))
]))
].filter(Boolean));
return link;
};