factor out duplication in CustomGraphNode and SolutionsGraphNode