Correct way for resource query