We are trying to pass an apollo link object instead of string to the two endpoints but we are getting error that the apollo link is not assignable to type string.
return new ApolloClient({
ssrMode: typeof window === 'undefined',
link: ApolloLink.from([
new MultiAPILink({
endpoints: {
laravel: {
link: ApolloLink.from([
authLink,
errorLink,
httpLink
])
},
wordpress: {
link: ApolloLink.from([
authLinkwp,
errorLinkwp,
httpLinkwp
])
}
}
})
]),
cache: new InMemoryCache(),
});
}
We are trying to pass an apollo link object instead of string to the two endpoints but we are getting error that the apollo link is not assignable to type string.
How can this be fixed and how can we add different cache for each