Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const createClient = (opts: { ssrMode?: boolean; token?: string }, state?) => {
const client = new ApolloClient({
link: ApolloLink.from([logs(opts), auth(opts), http(opts)]),
...opts
});
if (state) {
client.cache.restore(state);
}
return client;
};
const createClient = (opts = {}, state) => {
const client = new ApolloClient({
link: ApolloLink.from([logs(opts), auth(opts), http(opts)]),
...opts
});
if (state) {
client.cache.restore(state);
}
return client;
};