Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/controllers/graphql_devise/application_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
module GraphqlDevise
class ApplicationController < DeviseTokenAuth::ApplicationController
private

def verify_authenticity_token
end
end
end
5 changes: 5 additions & 0 deletions spec/dummy/app/controllers/api/v1/graphql_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ class GraphqlController < ApplicationController
def graphql
render json: DummySchema.execute(params[:query])
end

private

def verify_authenticity_token
end
end
end
end
1 change: 1 addition & 0 deletions spec/dummy/app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
end
4 changes: 4 additions & 0 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,8 @@
config.include(Requests::AuthHelpers, type: :request)
config.include(ActiveSupport::Testing::TimeHelpers)
config.include(Generators::FileHelpers, type: :generator)

config.before(:suite) do
ActionController::Base.allow_forgery_protection = true
end
end