Sha256: c5f75aeae6944ac818c631ca2ade7c754526c6b5dc8d0f6d6e57a0a39a753bd3

Contents?: true

Size: 498 Bytes

Versions: 47

Compression:

Stored size: 498 Bytes

Contents

# frozen_string_literal: true

module Ibrain
  module Types
    class BaseField < GraphQL::Schema::Field
      argument_class ::Ibrain::Types::BaseArgument

      def initialize(*args, default_value: nil, roles: nil, **kwargs, &block)
        super(*args, camelize: false, **kwargs, &block)

        extension(::Ibrain::Extentions::DefaultValue, default_value: default_value) unless default_value.nil?
        extension(Ibrain::Extentions::Roles, roles: roles) if roles
      end
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
ibrain-core-0.2.9 app/graphql/ibrain/types/base_field.rb
ibrain-core-0.2.8 app/graphql/ibrain/types/base_field.rb
ibrain-core-0.2.7 app/graphql/ibrain/types/base_field.rb
ibrain-core-0.2.6 app/graphql/ibrain/types/base_field.rb
ibrain-core-0.2.5 app/graphql/ibrain/types/base_field.rb
ibrain-core-0.2.4 app/graphql/ibrain/types/base_field.rb
ibrain-core-0.2.3 app/graphql/ibrain/types/base_field.rb