this is the type of NextApiRequest in an API route using the node runtime.
export interface NextApiRequest extends IncomingMessage {
/**
* Object of `query` values from url
*/
query: Partial<{
[key: string]: string | string[];
}>;
/**
* Object of `cookies` from header
*/
cookies: Partial<{
[key: string]: string;
}>;
body: any;
env: Env;
draftMode?: boolean;
preview?: boolean;
/**
* Preview data set on the request, if any
* */
previewData?: PreviewData;
}
how can I access the query object?
for example, if the URL looks like this: http://localhost:3000/api/node/prisma-neon-regional?count=1, how can I access count?