Set query as dependency