  We present a dynamical study of the intermediate polar cataclysmic variable
YY Dra based on time-series observations in the $K$ band, where the donor star
is known to be the major flux contributor. We covered the $3.97$-h orbital
cycle with 44 spectra taken between $2020$ and $2022$ and two epochs of
photometry observed in 2021 March and May. One of the light curves was
simultaneously obtained with spectroscopy to better account for the effects of
irradiation of the donor star and the presence of accretion light. From the
spectroscopy, we derived the radial velocity curve of the donor star metallic
absorption lines, constrained its spectral type to M0.5$-$M3.5 with no
measurable changes in the effective temperature between the irradiated and
non-irradiated hemispheres of the star, and measured its projected rotational
velocity $v_\mathrm{rot} \sin i = 103 \pm 2 \, \mathrm{km}\,\mathrm{s}^{-1}$.
Through simultaneous modelling of the radial velocity and light curves, we
derived values for the radial velocity semi-amplitude of the donor star, $K_2 =
188^{+1}_{-2} \, \mathrm{km} \, \mathrm{s}^{-1}$, the donor to white dwarf mass
ratio, $q=M_2/M_1 = 0.62 \pm 0.02$, and the orbital inclination,
$i={42^{\circ}}^{+2^{\circ}}_{-1^{\circ}}$. These binary parameters yield
dynamical masses of $M_{1} = 0.99^{+0.10}_{-0.09} \, \mathrm{M}_{\odot}$ and
$M_2 = 0.62^{+0.07}_{-0.06} \, \mathrm{M}_{\odot}$ ($68$ per cent confidence
level). As found for the intermediate polars GK Per and XY Ari, the white dwarf
dynamical mass in YY Dra significantly differs from several estimates obtained
by modelling the X-ray spectral continuum.
