title: Can I add data to a GraphQL edge?
body: <p>I'm playing around with GraphQL, and I've run across the concept of connections and edges.</p>
  
  <p>From what I understand it's not uncommon to see metadata on the connection, like the <code>totalCount</code> property in the following snippet.</p>
  
  <pre><code>type UserFriendsConnection {
    pageInfo: PageInfo!
    edges: [UserFriendsEdge]
    totalCount: Int
  }
  </code></pre>
  
  <p>My questions is whether it's OK to put arbitrary metadata on the edge also, and if the following would be a decent way to do that.</p>
  
  <p>I felt like a query and a response would best illustrate what I'm looking for. It's the <code>role</code> property I want to place somewhere that makes sense.</p>
  
  <p>I feel like it doesn't belong in the <code>User</code> type since the role describes the type of connection/relationship the <code>User</code> has with a <code>Group</code>.</p>
  
  <pre><code># Query
  
  {
    me {
      id
      name
      groupsConnection {
        edges {
          node {
            id
            name
            membersConnection {
              edges {
                  node {
                  id
                  name
                }
                role                             &lt;--- HERE
              }
            }
          }
          role                                   &lt;--- HERE
        }
      }
    }
  }
  </code></pre>
  
  <pre><code># Response
  
  {
    "data": {
      "me": {
        "id": "1Edj3hZFg",
        "name": "John Doe",
        "groupsConnection": {
          "edges": [
            {
              "node": {
                "id": "bpQgdZweQE",
                "name": "Fishing Team",
                "membersConnection": {
                  "edges": [
                    {
                      "node": {
                        "id": "1Edj3hZFg",
                        "name": "John Doe"
                      },
                      "role": "ADMINISTRATOR"    &lt;--- HERE
                    },
                    {
                      "node": {
                        "id": "7dj37dH2d",
                        "name": "Rebecca Anderson"
                      },
                      "role": "MEMBER"           &lt;--- HERE
                    }
                  ]
                }
              },
              "role": "ADMINISTRATOR"            &lt;--- HERE
            }
          ]
        }
      }
    }
  }
  </code></pre>