add close support for graph block (up #276)
simplify graph block