Sha256: a82e8c1d77712b18e43bb72c0eb8d855279a0c3686f33fe2af7a52038df6b4ab

Contents?: true

Size: 478 Bytes

Versions: 9

Compression:

Stored size: 478 Bytes

Contents

# frozen_string_literal: true

module Ibrain
  module Resolvers
    class BaseResolver < GraphQL::Schema::Resolver
      argument :filter, Ibrain::Types::FilterType, required: false, default_value: nil
      argument :limit, Int, required: false, default_value: 10
      argument :offset, Int, required: false, default_value: 0

      def current_user
        context.fetch(:current_user)
      end

      def controller
        context[:controller]
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ibrain-core-0.2.6 app/graphql/ibrain/resolvers/base_resolver.rb
ibrain-core-0.2.5 app/graphql/ibrain/resolvers/base_resolver.rb
ibrain-core-0.2.4 app/graphql/ibrain/resolvers/base_resolver.rb
ibrain-core-0.2.3 app/graphql/ibrain/resolvers/base_resolver.rb
ibrain-core-0.2.2 app/graphql/ibrain/resolvers/base_resolver.rb
ibrain-core-0.2.1 app/graphql/ibrain/resolvers/base_resolver.rb
ibrain-core-0.2.0 app/graphql/ibrain/resolvers/base_resolver.rb
ibrain-core-0.1.9 app/graphql/ibrain/resolvers/base_resolver.rb
ibrain-core-0.1.8 app/graphql/ibrain/resolvers/base_resolver.rb