function createApolloClient() {
return new ApolloClient({
ssrMode: typeof window === "undefined",
link: authLink().concat(
new HttpLink({
uri: process.env.NEXT_PUBLIC_API_URL,
}),
),
cache: new InMemoryCache({
typePolicies: {
Query: {
fields: {
posts: relayStylePagination(),
},
},
},
}),
});
}
function createApolloClient() {
return new ApolloClient({
ssrMode: typeof window === "undefined",
link: authLink().concat(
new HttpLink({
uri: process.env.NEXT_PUBLIC_API_URL,
}),
),
cache: new InMemoryCache({
typePolicies: {
Query: {
fields: {
posts: relayStylePagination(),
},
},
},
}),
});
}