lib/rails/graphql/request/prepared_data.rb in rails-graphql-1.0.0.beta vs lib/rails/graphql/request/prepared_data.rb in rails-graphql-1.0.0.rc1

- old
+ new

@@ -15,10 +15,11 @@ NULL = Object.new.freeze REPEAT_OPTIONS = { true => true, false => 1, + once: 1, cycle: true, always: true, }.freeze # Look up the given +field+ using the request as a reference. It accepts @@ -53,10 +54,11 @@ MSG @field = field @value = value @array = value.is_a?(Array) && !field.array? - @repeat = + @repeat = true if !@array && !value.is_a?(Array) + @repeat ||= case repeat when Numeric then repeat when Enumerator then repeat.size else REPEAT_OPTIONS[repeat] end