Two classes of quantum spin systems that are gapped on any bounded-degree graph