inject query factory directly