Pass query to item factory