Sha256: 4e2b7369c8f1ab352b81b4b7825d3168ed8ade9c31dc60874cb7c49a91f88dd0

Contents?: true

Size: 530 Bytes

Versions: 15

Compression:

Stored size: 530 Bytes

Contents

# frozen_string_literal: true

module Ibrain
  module Resolvers
    class BaseResolver < GraphQL::Schema::Resolver
      argument_class ::Ibrain::Types::BaseArgument

      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

15 entries across 15 versions & 1 rubygems

Version Path
ibrain-core-0.3.6.pre.rc.1 app/graphql/ibrain/resolvers/base_resolver.rb
ibrain-core-0.3.6 app/graphql/ibrain/resolvers/base_resolver.rb
ibrain-core-0.3.5 app/graphql/ibrain/resolvers/base_resolver.rb
ibrain-core-0.3.4 app/graphql/ibrain/resolvers/base_resolver.rb
ibrain-core-0.3.3.pre.rc.2 app/graphql/ibrain/resolvers/base_resolver.rb
ibrain-core-0.3.3.pre.rc.1 app/graphql/ibrain/resolvers/base_resolver.rb
ibrain-core-0.3.3 app/graphql/ibrain/resolvers/base_resolver.rb
ibrain-core-0.3.2.pre.rc.4 app/graphql/ibrain/resolvers/base_resolver.rb
ibrain-core-0.3.2.pre.rc.3 app/graphql/ibrain/resolvers/base_resolver.rb
ibrain-core-0.3.2.pre.rc app/graphql/ibrain/resolvers/base_resolver.rb
ibrain-core-0.3.2 app/graphql/ibrain/resolvers/base_resolver.rb
ibrain-core-0.3.1 app/graphql/ibrain/resolvers/base_resolver.rb
ibrain-core-0.3.0 app/graphql/ibrain/resolvers/base_resolver.rb
ibrain-core-0.2.9 app/graphql/ibrain/resolvers/base_resolver.rb
ibrain-core-0.2.8 app/graphql/ibrain/resolvers/base_resolver.rb