added metod for building pagination meta from query