module GraphQL module Relay # Helpers for efficient `RANGE_ADD` mutations. # # Add an edge to a connection. # 'append', 'ignore', 'prepend', 'refetch', or 'remove' module RangeAdd RANGE_BEHAVIORS = [ # Put the new item at the _start_ of the connection PREPEND = :prepend, # Put the new item at the _end_ of the connection APPEND = :append, # Although the item is added to storage, don't include it in the response IGNORE = :ignore, # Don't try to efficiently calculate the new item's position. # Instead, refetch the whole connection. REFETCH = :refetch, # ??? REMOVE = :remove, ] end end end