Compact set of invariants characterizing graph states of up to eight