Sha256: 40c76214b9172211d4cb7294c507b80824bee7be10d571097aeed1f7a1fd2935
Contents?: true
Size: 562 Bytes
Versions: 43
Compression:
Stored size: 562 Bytes
Contents
module GraphQL class Query class InputValidationResult attr_accessor :problems def valid? @problems.nil? end def add_problem(explanation, path = nil) @problems ||= [] @problems.push({ "path" => path || [], "explanation" => explanation }) end def merge_result!(path, inner_result) return if inner_result.valid? inner_result.problems.each do |p| item_path = [path, *p["path"]] add_problem(p["explanation"], item_path) end end end end end
Version data entries
43 entries across 43 versions & 1 rubygems
Version | Path |
---|---|
graphql-0.14.1 | lib/graphql/query/input_validation_result.rb |
graphql-0.14.0 | lib/graphql/query/input_validation_result.rb |
graphql-0.13.0 | lib/graphql/query/input_validation_result.rb |