I'm upgrading a rails app from 5.2 to 6.1. Previous I was using 5.1 defaults, now I'm up to 6.1 defaults.
In rails 5.2, forgery protection became a default. So, when I went all the way up to 6.1 a few things started breaking.
I added skip_forgery_protection to my graphql controller and that fixed all my failing tests. No tests accessing other controllers (which are definitely not implementing the forgery system in the frontend) failed, nor did other things I tried manually.
One theory I had is forgery_protection only applies to POST, PUT, PATCH, and DELETE, but I found zero discussion or mention of this online and it doesn't seem to be what I'm observing (although I admit I haven't been thorough about testing that theory yet).
Everything inherits from the same ApplicationController
What could be going on?
I'm not sure I understand your question correctly.
But, if you are asking why forgery_protection only applies to POST, PUT, PATCH, and DELETE then the doc says,
And from wikipedia,