use variable for __resourceQuery