Make queryOptions work even query is not provided