Say we have a complex function $f(z)$. Then $z = x + iy$, so $z$ can be thought of as a function of $x$ and $y$. Thus we can take partial derivatives to get $$\frac{dz}{dx} = 1,\ \frac{dz}{dy} = i.$$
So by the chain rule, can we say that
$$\frac{df}{dz} = \frac{df}{dx}\cdot \frac{dx}{dz} + \frac{df}{dy}\cdot \frac{dy}{dz} = \frac{df}{dx} - i\cdot \frac{df}{dy}\ ?$$
However, I know that this goes against the Cauchy-Riemann equations since $\frac{df}{dz}$ is actually equal to $\frac{df}{dx}$ and $-i\cdot \frac{df}{dy}$. Am I missing something obvious here?