Sha256: 81a463b2750bd029359b9b5cf947a7ec7098545c10182bc3033067f9fa68d0ba

Contents?: true

Size: 500 Bytes

Versions: 2

Compression:

Stored size: 500 Bytes

Contents

module Api
  module V1
    class GraphqlController < ApplicationController
      include GraphqlDevise::Concerns::SetUserByToken

      before_action -> { set_resource_by_token(:user) }

      def graphql
        render json: DummySchema.execute(params[:query], context: graphql_context)
      end

      def interpreter
        render json: InterpreterSchema.execute(params[:query], context: graphql_context)
      end

      private

      def verify_authenticity_token
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
graphql_devise-0.12.1 spec/dummy/app/controllers/api/v1/graphql_controller.rb
graphql_devise-0.12.0 spec/dummy/app/controllers/api/v1/graphql_controller.rb