use devise instead auth0

This commit is contained in:
João Geonizeli
2021-08-09 22:07:48 -03:00
parent 15abf28e80
commit 645b818f6c
48 changed files with 519 additions and 399 deletions

View File

@@ -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)