Query resolver