the context from getStaticProps is undefined.
If I console.log the context I get:
{ locales: undefined, locale: undefined }
I need the information from the url... If I try the same with getServerSideProps it is working. I'm using apollo with nextjs like the example: https://github.com/vercel/next.js/tree/canary/examples/with-apollo
export async function getStaticProps(context) {
const apolloClient = initializeApollo();
await apolloClient.query({
query: PAGE,
variables: variables,
});
console.log(context);
// { locales: undefined, locale: undefined }
// !!! need the info from the URL !!!
return {
props: {
initialApolloState: apolloClient.cache.extract(),
},
revalidate: 1,
};
}
Thx for any help.