title: Why can't I get query params in ```getStaticProps```?
body: <p>I will make it simple:</p>
  <p>Link: <code>http://localhost:3000/product/bioCloths?activeCategory=medium&amp;id=0</code></p>
  <p>File path: <code>pages/product/[product].js</code>.</p>
  <p>Expected: <code> product: &quot;bioCloths, activeCategory: &quot;medium&quot;, id: &quot;0&quot;</code></p>
  <p>using <code>getStaticProps</code> at <code>[product].js</code>:</p>
  <pre><code>const ProductDetails = (props) =&gt; {
    console.log(&quot;initial props&quot;, props);
  
    return &lt;div&gt;product details...&lt;/div&gt;
  };
  
  export default ProductDetails;
  
  export async function getStaticProps(context) {
  
    return {
      props: {
       context: context
      },
    };
  }
  
  export async function getStaticPaths() {
    return {
      paths: [{ params: { product: &quot;1&quot; } }, { params: { product: &quot;2&quot; } }],
      fallback: true,
    };
  }
  </code></pre>
  <p><code>Props</code> returns: <code>context: params: product: &quot;bioCloths&quot;</code>, excluding the query params.</p>
  <p>Now if I use the deprecated <code>getInitialProps</code> instead:</p>
  <pre><code>ProductDetails.getInitialProps = (context) =&gt; {
    const activeCategory = context.query.activeCategory;
    const id = context.query.id;
    const product = context.query.product;
  
    return {
      activeCategory: activeCategory,
      id: id,
      product: product,
    };
  };
  </code></pre>
  <p>props logs <code>activeCategory: &quot;medium&quot; id: &quot;0&quot; product: &quot;bioCloths&quot;</code></p>
  <p>I need to get these all of these props so I can <code>fetch</code> data before the client mounts.</p>
  <p>I understand that <code>getInitialProps</code> is now deprecated, but it works. Why is not <code>getStaticProps</code> working, and should I use it instead of <code>serverSideProps</code>?</p>
  <p>This is an ecommerce, and there is no way I can set <code>getStaticPaths</code> for hundreds of possibilities, to work along with <code>getStaticProps</code> so I guess that in this case I should use <code>getInitialProps or getServerSideProps</code>?</p>
  <p>P.S - <code>getServerSideProps</code> hits me an error stating that it will only accept <code>.json</code> files.</p>