Quering multiple collections using getServerSideProps

How could you query multiple collections in next js at once, for example i want to access all collections in the getServerSideProp request and then use slug to get the information of the page based on the slug they came in on? Thanks!