title: how to fetch api just onc in build time in a SSR page in nextjs
body: <p>I tried to include getStaticProps + getInitialProps simultaneously but nextjs does not allow this.</p>
  <p>Why i need this?</p>
  <p>because an api data fetch needs to be done just once at build-time and be shared after that.
  This api returns a json file that will be used to create menu categories.
  Now I have created a json file and after analyzing bundles i saw that each page of my application has this json file and the size of common chunk had increased.
  How can i solve this problem? what is the best pattern to implement menu category header with lots of categories?</p>