first work to make the subgraph query work