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.5.15 app/graphql/ibrain/types/base_field.rb
ibrain-core-0.5.13 app/graphql/ibrain/types/base_field.rb
ibrain-core-0.5.12 app/graphql/ibrain/types/base_field.rb
ibrain-core-0.5.10 app/graphql/ibrain/types/base_field.rb
ibrain-core-0.5.9 app/graphql/ibrain/types/base_field.rb
ibrain-core-0.5.8 app/graphql/ibrain/types/base_field.rb
ibrain-core-0.5.7 app/graphql/ibrain/types/base_field.rb
ibrain-core-0.5.6 app/graphql/ibrain/types/base_field.rb
ibrain-core-0.5.5 app/graphql/ibrain/types/base_field.rb
ibrain-core-0.5.4 app/graphql/ibrain/types/base_field.rb
ibrain-core-0.5.3 app/graphql/ibrain/types/base_field.rb
ibrain-core-0.5.2 app/graphql/ibrain/types/base_field.rb
ibrain-core-0.5.1 app/graphql/ibrain/types/base_field.rb
ibrain-core-0.5.0 app/graphql/ibrain/types/base_field.rb
ibrain-core-0.4.9 app/graphql/ibrain/types/base_field.rb
ibrain-core-0.4.8 app/graphql/ibrain/types/base_field.rb
ibrain-core-0.4.7 app/graphql/ibrain/types/base_field.rb
ibrain-core-0.4.5 app/graphql/ibrain/types/base_field.rb
ibrain-core-0.4.4 app/graphql/ibrain/types/base_field.rb
ibrain-core-0.4.3 app/graphql/ibrain/types/base_field.rb