File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
lib/generators/graphql/templates
spec/integration/rails/generators/graphql Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ class GraphqlController < ApplicationController
3
3
# This allows for outside API access while preventing CSRF attacks,
4
4
# but you 'll have to authenticate your user separately
5
5
protect_from_forgery with: :null_session
6
-
6
+
7
7
def execute
8
8
variables = ensure_hash(params[:variables])
9
9
query = params[:query]
Original file line number Diff line number Diff line change @@ -176,6 +176,11 @@ def test_field
176
176
177
177
EXPECTED_GRAPHQLS_CONTROLLER = <<-'RUBY'
178
178
class GraphqlController < ApplicationController
179
+ # If accessing from outside this domain, nullify the session
180
+ # This allows for outside API access while preventing CSRF attacks,
181
+ # but you'll have to authenticate your user separately
182
+ protect_from_forgery with: :null_session
183
+
179
184
def execute
180
185
variables = ensure_hash(params[:variables])
181
186
query = params[:query]
You can’t perform that action at this time.
0 commit comments