Tunneling matched-resource-graph into templates