refactor(resolver): simplify if/else structure