title: Programmatically creating edges in ArangoDB
body: <p>What is the simplest way to quickly create edges in ArangoDB programmatically?</p>
  
  <p>I would like to create relationships between documents based on a common attribute. I'd like to be able to select an attribute, and for every document in collection A, create an edge to every document in collection B that has the same value in an equivalent attribute.</p>
  
  <p>For example, if I've imported email messages into a collection and people into another collection, I would like to generate edges between the emails and collections. An email's schema might look like this:</p>
  
  <pre><code>{
    "_key":
    "subject":
    "body":
    "from":
    "to":
  }
  </code></pre>
  
  <p>And a person's schema might look like this:</p>
  
  <pre><code>{
    "_key":
    "name":
    "email":
  }
  </code></pre>
  
  <p>Let's say that the values in the <code>from</code> and <code>to</code> fields in the email messages correspond to email addresses that we may find in the people collection.</p>
  
  <p>I'd like to be able to take the collections, attributes, and edge parameters as input, then, for every document in the people collection, create an edge to every document in the email collection that has the same email address in the <code>from</code> attribute as the current document's <code>email</code> attribute.</p>
  
  <p>So far, I think that Foxx may be the best tool for this, but I am a bit overwhelmed by the documentation.</p>
  
  <p>Eventually, I'd like to create a full CRUD based on shared attributes between documents defining edges, including an "upsert" equivalent- updating an edge if it already exists and creating it if it doesn't.</p>
  
  <p>I know that doing this with individual API calls with the standard HTTP API would be far too slow, since I would need to query Arango for every document in a collection and return very large numbers of results.</p>
  
  <p>Is there already a Foxx service that does this? If not, where should I start to create one?</p>