Sha256: d8e43dd36685dbeae5ccdd6946a712bd73447c1e06f48940406bda545abcab0f

Contents?: true

Size: 900 Bytes

Versions: 4

Compression:

Stored size: 900 Bytes

Contents

# frozen_string_literal: true

module GraphQL
  class Schema
    class Member
      module TypeSystemHelpers
        # @return [Schema::NonNull] Make a non-null-type representation of this type
        def to_non_null_type
          GraphQL::Schema::NonNull.new(self)
        end

        # @return [Schema::List] Make a list-type representation of this type
        def to_list_type
          GraphQL::Schema::List.new(self)
        end

        # @return [Boolean] true if this is a non-nullable type. A nullable list of non-nullables is considered nullable.
        def non_null?
          false
        end

        # @return [Boolean] true if this is a list type. A non-nullable list is considered a list.
        def list?
          false
        end

        # @return [GraphQL::TypeKinds::TypeKind]
        def kind
          raise NotImplementedError
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
graphql-1.8.2 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.8.1 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.8.0 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.8.0.pre11 lib/graphql/schema/member/type_system_helpers.rb