Sha256: 67682f416ac6fe7ead7a95eb9106db310c693677f3f03ca2701afffd716f67e9

Contents?: true

Size: 741 Bytes

Versions: 72

Compression:

Stored size: 741 Bytes

Contents

# frozen_string_literal: true

module GraphQL
  class Schema
    class Member
      module ValidatesInput
        def valid_input?(val, ctx)
          validate_input(val, ctx).valid?
        end

        def validate_input(val, ctx)
          if val.nil?
            GraphQL::Query::InputValidationResult.new
          else
            validate_non_null_input(val, ctx)
          end
        end

        def valid_isolated_input?(v)
          valid_input?(v, GraphQL::Query::NullContext)
        end

        def coerce_isolated_input(v)
          coerce_input(v, GraphQL::Query::NullContext)
        end

        def coerce_isolated_result(v)
          coerce_result(v, GraphQL::Query::NullContext)
        end
      end
    end
  end
end

Version data entries

72 entries across 72 versions & 2 rubygems

Version Path
graphql-1.13.15 lib/graphql/schema/member/validates_input.rb
graphql-1.13.14 lib/graphql/schema/member/validates_input.rb
graphql-1.13.13 lib/graphql/schema/member/validates_input.rb
graphql_cody-1.13.0 lib/graphql/schema/member/validates_input.rb
graphql-1.13.12 lib/graphql/schema/member/validates_input.rb
graphql-1.13.11 lib/graphql/schema/member/validates_input.rb
graphql-1.13.10 lib/graphql/schema/member/validates_input.rb
graphql-2.0.0 lib/graphql/schema/member/validates_input.rb
graphql-1.13.9 lib/graphql/schema/member/validates_input.rb
graphql-1.12.24 lib/graphql/schema/member/validates_input.rb
graphql-1.13.8 lib/graphql/schema/member/validates_input.rb
graphql-1.13.7 lib/graphql/schema/member/validates_input.rb
graphql-1.13.6 lib/graphql/schema/member/validates_input.rb
graphql-1.13.5 lib/graphql/schema/member/validates_input.rb
graphql-1.13.4 lib/graphql/schema/member/validates_input.rb
graphql-1.13.3 lib/graphql/schema/member/validates_input.rb
graphql-1.12.23 lib/graphql/schema/member/validates_input.rb
graphql-1.13.2 lib/graphql/schema/member/validates_input.rb
graphql-1.13.1 lib/graphql/schema/member/validates_input.rb
graphql-1.12.22 lib/graphql/schema/member/validates_input.rb