Sha256: fa4d5265259c1988d0ec3cdaa138be7fa37b1e093872ff8eb8b9842689784fe1

Contents?: true

Size: 478 Bytes

Versions: 1

Compression:

Stored size: 478 Bytes

Contents

# frozen_string_literal: true

module Ibrain
  module Types
    class BaseObject < GraphQL::Schema::Object
      include GraphQL::Relay::Node

      edge_type_class(Ibrain::Types::BaseEdge)
      connection_type_class(Ibrain::Types::BaseConnection)

      field_class ::Ibrain::Types::BaseField

      protected

      def loader
        Ibrain::Loaders::AssociationLoader
      end

      def current_user
        context.try(:fetch, :current_user)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ibrain-core-0.5.3 app/graphql/ibrain/types/base_object.rb