One-dimensional graph perturbations of selfadjoint relations