making graph query work