Sha256: 1049f019bd952bb68d8d7a14bf3a3a523113cd9f2ee19740ab397231fce1e7aa

Contents?: true

Size: 990 Bytes

Versions: 30

Compression:

Stored size: 990 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

        def to_type_signature
          graphql_name
        end

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

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
graphql-1.11.4 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.11.3 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.11.2 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.10.14 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.11.1 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.10.13 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.11.0 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.10.12 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.9.21 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.10.11 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.9.20 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.10.10 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.10.9 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.10.8 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.10.7 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.10.6 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.10.5 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.10.4 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.10.3 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.10.2 lib/graphql/schema/member/type_system_helpers.rb