Let $\kappa$ be an infinite cardinal and suppose $$n, d: \kappa \to \big((\kappa+1)\setminus \{0\}\big) = \{1, \ldots, \kappa\}$$ are arbitrary functions.
Is there $E \subseteq \big\{\{x,y\}: x\neq y \in \kappa\big\}$ such that the graph $G=(\kappa,E)$ has the following property?
For all $k\in \kappa$ there are exactly $n(k)$ elements of $\kappa$ that have degree $d(k)$.