app/services/mutation_operations/edges.rb
def load_and_validate_edge!(config)
      parent = retrieve_edge_arg_from config.parent

      child = retrieve_edge_arg_from config.child

      if parent.blank? || child.blank?
        # :nocov:
        return set_blank_edge_for! config if config.skip_blank?

        raise GraphQL::ExecutionError.new("Cannot derive edge for #{config.inspect}")
        # :nocov:
      end

      validate_edge(parent, child) do |m|
        m.edge do |edge|
          set_edge_for! config, edge
        end

        m.unacceptable do |invalid|
          message = I18n.t("dry_validation.errors.unacceptable_edge", parent: invalid.parent, child: invalid.child)

          add_global_error! message
        end

        m.incomprehensible do |error|
          # :nocov:
          add_global_error! error.to_s
          # :nocov:
        end
      end
    end
# This will attempt to load an edge based on its configuration, retrieving
# the values based on their respective `source`,
#
# @api private
# @param [MutationOperations::Edges::EdgeConfiguration] config
# @return [void]
This will attempt to load an edge based on its configuration, retrieving
the values based on their respective `source`.
This will attempt to load an edge based on its configuration retrieving the values based on their respective ` source ` .
def load_and_validate_edge!(config)
      parent = retrieve_edge_arg_from config.parent
      child = retrieve_edge_arg_from config.child
      if parent.blank? || child.blank?
        return set_blank_edge_for! config if config.skip_blank?
        raise GraphQL::ExecutionError.new("Cannot derive edge for #{config.inspect}")
      end
      validate_edge(parent, child) do |m|
        m.edge do |edge|
          set_edge_for! config, edge
        end
        m.unacceptable do |invalid|
          message = I18n.t("dry_validation.errors.unacceptable_edge", parent: invalid.parent, child: invalid.child)
          add_global_error! message
        end
        m.incomprehensible do |error|
          add_global_error! error.to_s
        end
      end
    end
def load_and_validate_edge! ( config ) parent = retrieve_edge_arg_from config . parent child = retrieve_edge_arg_from config . child if parent . blank? || child . blank? return set_blank_edge_for! config if config . skip_blank? raise GraphQL :: ExecutionError . new ( "Cannot derive edge for #{config.inspect}" ) end validate_edge ( parent , child ) do | m | m . edge do | edge | set_edge_for! config , edge end m . unacceptable do | invalid | message = I18n . t ( "dry_validation.errors.unacceptable_edge" , parent : invalid . parent , child : invalid . child ) add_global_error! message end m . incomprehensible do | error | add_global_error! error . to_s end end end
This will attempt to load an edge based on its configuration, retrieving
the values based on their respective `source`,
This will attempt to load an edge based on its configuration retrieving the values based on their respective ` source `
# :nocov: # :nocov: # :nocov: # :nocov:
None
void
config
None
api
None