lib/rails/graphql/request/strategy.rb
# Fetch the data for a given field and set as the first element
# of the returned list
Fetch the data for a given field and set as the first element
of the returned list
Fetch the data for a given field and set as the first element of the returned list
def data_for(result, field)
            return result << @data_pool[field] if @data_pool.key?(field)
            return if field.entry_point?
            current, key = context.current_value, field.method_name
            return result << current.public_send(key) if current.respond_to?(key)
            result << current[key] if current.respond_to?(:key?) && current.key?(key)
          end
def data_for ( result , field ) return result << @data_pool [ field ] if @data_pool . key? ( field ) return if field . entry_point? current , key = context . current_value , field . method_name return result << current . public_send ( key ) if current . respond_to? ( key ) result << current [ key ] if current . respond_to? ( :key? ) && current . key? ( key ) end
Fetch the data for a given field and set as the first element
of the returned list
Fetch the data for a given field and set as the first element of the returned list
result
field