Sha256: 563ba0a4e2c486d458a08be823bb99a07e2bf6611cddf3385264972a4d1b5d14

Contents?: true

Size: 966 Bytes

Versions: 36

Compression:

Stored size: 966 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 NotImplementedError
        end
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
graphql-1.8.18 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.9.14 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.10.0.pre1 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.9.13 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.9.12 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.9.11 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.9.10 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.9.9 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.9.8 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.9.7 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.9.6 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.9.5 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.9.4 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.9.3 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.9.2 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.8.17 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.8.16 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.9.1 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.9.0 lib/graphql/schema/member/type_system_helpers.rb
graphql-1.8.15 lib/graphql/schema/member/type_system_helpers.rb