use devise instead auth0
This commit is contained in:
@@ -1,16 +1,11 @@
|
||||
# frozen_string_literal: true
|
||||
class GraphqlController < ApplicationController
|
||||
include Authenticable
|
||||
|
||||
protect_from_forgery with: :null_session
|
||||
|
||||
def execute
|
||||
variables = prepare_variables(params[:variables])
|
||||
query = params[:query]
|
||||
operation_name = params[:operationName]
|
||||
context = {
|
||||
current_auth: current_auth,
|
||||
current_user: current_auth&.user,
|
||||
current_user: current_user,
|
||||
}
|
||||
result = XStakeSchema.execute(query, variables: variables, context: context, operation_name: operation_name)
|
||||
render(json: result)
|
||||
|
||||
Reference in New Issue
Block a user