I have read that opposite charges attract when mediated by odd-spin gauge particles, like the photon, and that they repel when mediated by even-spin gauge particles, like the graviton.
Is there an intuïtive explanation for this or is it a logical mathematical consequence, and if so, how does it work?
EDIT
In the first answer to this question (why gravity is attractive) we can read:
In Quantum Field Theory, "forces" between 2 "charged" particles correspond to an exchange of "virtual gauge bosons". For instance, the repulsive force between 2 electrons, corresponds to an "exchange" of a "virtual photon" (a perturbation of the photon field). Here the gauge boson is the photon, of spin 1.
We may consider a graviton theory as a QFT, in this case, the charge is the momentum/energy of the particle, and the gauge boson is the graviton, of spin 2.
In these theories, you have to write a Lagrangian, and you have to respect a sign coherence about the Euclidean action which has to be positive. This constraint gives you the correct sign for the Lorentz-invariant Lagrangian.
The mathematical procedure is explained in words, but I'm curious about the actual math involved. I can't find it nowhere. What is the "sign of coherence about the Euclidean action" you have to respect? And how does the correct sign for the Lorentz-invariant Lagrangian ensure that odd/even-spin gauge particles cause like charges to repel/attract?