What are the parameters involved in the gradient calculation of a GAN?

I have designed a GAN in which while training the discriminator I did -
lossDiscriminator.backward(retain_graph=True).
After that I do
lossGenerator.backward()

I would like to know what are all parameters involved in calculating the gradient of the discriminator and the generator respectively. are all the parameters from both the neural networks are involved since I did retain_graph= True ?