Generalized IdGraph to selectively enable custom vertex or edge IDs, accommodating base graphs which do not support either edge or vertex indexing