title: Fastify Typescript request query
body: <p>I'm trying to put together a simple endpoint following the Fastify with Typescript docs here:</p>
  <p><a href="https://www.fastify.io/docs/v3.1.x/TypeScript/" rel="noreferrer">https://www.fastify.io/docs/v3.1.x/TypeScript/</a></p>
  <pre><code>export default async function foo(fastify: any) {
         const MyInstance = new Foo(fastify.db);
         app.get&lt;{ Querystring: IQueryString, Headers: IHeaders }&gt;(
             &quot;/foo&quot;,
             async (request: FastifyRequest, reply: FastifyReply) =&gt; {
                console.log(request.query); // *prints query object*
                const { queryObj } = request.query; // *Gives error: Object is of type 'unknown'*
                const result = await MyInstance.getFoo(queryObj);
                reply.status(200).send(result);
             }
         );
     }
  </code></pre>
  <p>Why do I get the error when I try to access the <code>request.query</code> object and how do I fix it?</p>