convenience methods to just serialize a subgraph