Uncovering dark matter density profiles in dwarf galaxies with graph neural networks