lib/rails/graphql/request/strategy.rb
def prepare(field, &block)
          # TODO: Maybe rely on resolve when it does not have a prepare step,
          # even though queries should not be executed on resolve
          value = safe_store_data(field) do
            result = Event.trigger(:prepare, field, self, **PREPARE_XARGS)
            field.mutation? ? perform(field, result) : result
          end

          context.stacked(value, &block) unless value.nil?
        end
# Execute the prepare step for the given +field+ and execute the given
# block using context stack
Execute the prepare step for the given +field+ and execute the given
block using context stack
Execute the prepare step for the given + field + and execute the given block using context stack
def prepare(field, &block)
          value = safe_store_data(field) do
            result = Event.trigger(:prepare, field, self, **PREPARE_XARGS)
            field.mutation? ? perform(field, result) : result
          end
          context.stacked(value, &block) unless value.nil?
        end
def prepare ( field , & block ) value = safe_store_data ( field ) do result = Event . trigger ( :prepare , field , self , ** PREPARE_XARGS ) field . mutation? ? perform ( field , result ) : result end context . stacked ( value , & block ) unless value . nil? end
Execute the prepare step for the given +field+ and execute the given
block using context stack
Execute the prepare step for the given + field + and execute the given block using context stack
# TODO: Maybe rely on resolve when it does not have a prepare step, # even though queries should not be executed on resolve
field
block