title: Why is my graphql nested query returning null?
body: <p>I'm new to graphql running into issue with nested queries and need help passing an id to identify a relationship.</p>
  <h2>Queries</h2>
  <p><a href="https://i.stack.imgur.com/iE2wl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iE2wl.png" alt="enter image description here" /></a></p>
  <p>Above you can see the <code>PERFORMED_FOR_Affiliation</code> is null, though it is defined in the schema as an <code>Affiliation</code> type.</p>
  <pre><code>type Query {
        affiliations(affn_id: ID!): [Affiliation]
        performances(pfrm_id: ID!): [Performance]
        PERFORMED_FOR_Affiliation(affn_id: ID!): Affiliation
        Performance_PERFORMED_FOR(pfrm_id: ID!): [Performance]
      }
  </code></pre>
  <p><code>PERFORMED_FOR_Affiliation</code> query is similar to  <code>affiliations</code> query only the relationship should return only 1 affiliation (with a matching uid).</p>
  <p><a href="https://i.stack.imgur.com/jUPo5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jUPo5.png" alt="enter image description here" /></a></p>
  <p>I assume affn_id is not being passed down correctly and not sure how to do that properly. Does the PERFORMED_FOR_Affiliation need its own schema?</p>
  <h2>Schema</h2>
  <pre><code>type Performance {
      pfrm_id: ID!
      mark: Int
      affn_id: ID!
      PERFORMED_FOR_Affiliation: Affiliation
  }
  
  type Affiliation {
      affn_id: ID!
      name: String
      Performance_PERFORMED_FOR: [Performance]
  }
  </code></pre>
  <p>I've seen some schemas that use 'nodes' and 'edge' types. As I have many other relationships would that be a better way to define the graph?</p>
  <h2>Resolvers</h2>
  <pre><code>import performances from './mockData/performances.js';
  import affiliations from './mockData/affiliations.js';
  
  export const resolvers = {
    Query: {
      affiliations: (root, args) =&gt; {
        return affiliations;
      },
      performances: (root, args) =&gt; {
        return performances;
      },
      PERFORMED_FOR_Affiliation: (root, args) =&gt; {
        return affiliations;
      },
      Performance_PERFORMED_FOR: (root, args) =&gt; {
        return performances;
      },
    },
  };
  </code></pre>
  <h2>MockData</h2>
  <pre><code>//affiliations.js
  module.exports = [
    {
      &quot;affn_id&quot;: &quot;43700F3BE17145399924AC176EACBEF4&quot;,
      &quot;name&quot;: &quot;Richmond Senior&quot;
    },
    {
      &quot;affn_id&quot;: &quot;8BDE709AC757416082950B1BEED0CE0A&quot;,
      &quot;name&quot;: &quot;Cedar City&quot;
    },
    {
      &quot;affn_id&quot;: &quot;123D201BB17545E3B6ECCCCB5FC61FA3&quot;,
      &quot;name&quot;: &quot;Delta&quot;
    }
  ]
  </code></pre>
  <p>and</p>
  <pre><code>// performances.js
  module.exports = [
    {
      pfrm_id: &quot;6BD41C6B1C4B43D199DE42A4A408DF1A&quot;,
      mark: 1270000,
      affn_id: &quot;43700F3BE17145399924AC176EACBEF4&quot;,
    },
    {
      pfrm_id: &quot;EA2FBC6AB891460EA557F5B60984AD8A&quot;,
      mark: 1422400,
      affn_id: &quot;8BDE709AC757416082950B1BEED0CE0A&quot;,
    },
    {
      pfrm_id: &quot;54A6EEB9552C49AC9F7A87E68AC272A2&quot;,
      mark: 1422400,
      affn_id: &quot;123D201BB17545E3B6ECCCCB5FC61FA3&quot;,
    },
  ]
  </code></pre>