app/services/mutation_operations/edges.rb
def derives_edge!(parent: :parent, child: :child, parent_source: :args, child_source: :args, skip_blank: false, on: :edge)
        config = EdgeConfiguration.new(
          key: on,
          skip_blank: skip_blank,
          parent: build_edge_component(parent, parent_source, :parent),
          child: build_edge_component(child, child_source, :child),
        )

        edge_configurations[on] = config
      end
# Add an edge to be loaded after the `prepare` step completes.
#
# This generates a {MutationOperations::Edges::EdgeConfiguration} which will be
# {MutationOperations::Edges#load_and_validate_edge! loaded and validated}.
#
# @note Successive calls of `derives_edge!` with the same `on` value will overwrite the previous.
# @note While the actual execution of the mutation will be prevented if an edge is invalid,
#   contracts will continue to run. Any contract that depends on an edge being available needs
#   to account for the possibility that it is unset.
# @param [Symbol] parent the name of the key to retrieve the parent of the edge
# @param [Symbol] child the name of the key to retrieve the child of the edge
# @param [MutationOperations::Edges::EdgeSource] parent_source where the value for the `parent` key should be retrieved from.
# @param [MutationOperations::Edges::EdgeSource] child_source where the value for the `child` key should be retrieved from.
# @param [Boolean] skip_blank if either side of the edge cannot be found, it will normally raise an error. If it's possible
#   for either value to be blank, set this to true and handle the case in a later contract or during the mutation itself.
# @param [Symbol] on the key under which to store the edge, in the case that multiple edges need be loaded.
# @return [void]
Add an edge to be loaded after the `prepare` step completes.
Add an edge to be loaded after the ` prepare ` step completes .
def derives_edge!(parent: :parent, child: :child, parent_source: :args, child_source: :args, skip_blank: false, on: :edge)
        config = EdgeConfiguration.new(
          key: on,
          skip_blank: skip_blank,
          parent: build_edge_component(parent, parent_source, :parent),
          child: build_edge_component(child, child_source, :child),
        )
        edge_configurations[on] = config
      end
def derives_edge! ( parent : :parent , child : :child , parent_source : :args , child_source : :args , skip_blank : false , on : :edge ) config = EdgeConfiguration . new ( key : on , skip_blank : skip_blank , parent : build_edge_component ( parent , parent_source , :parent ) , child : build_edge_component ( child , child_source , :child ) , ) edge_configurations [ on ] = config end
Add an edge to be loaded after the `prepare` step completes.
Add an edge to be loaded after the ` prepare ` step completes .
None
void
parent
child
parent_source
child_source
skip_blank
on
on the key under which to store the edge, in the case that multiple edges need be loaded.
on the key under which to store the edge in the case that multiple edges need be loaded .
note
Successive calls of `derives_edge!` with the same `on` value will overwrite the previous.
Successive calls of ` derives_edge! ` with the same ` on ` value will overwrite the previous .
note
While the actual execution of the mutation will be prevented if an edge is invalid, contracts will continue to run. Any contract that depends on an edge being available needs to account for the possibility that it is unset.
While the actual execution of the mutation will be prevented if an edge is invalid contracts will continue to run . Any contract that depends on an edge being available needs to account for the possibility that it is unset .