title: graphql - resolver root/parent property is null
body: <p>Given this schema:</p>
  
  <pre><code>const typeDefs = gql`type Asset {
    id: ID!
    name: String!
    ScanProfiles: [ScanProfile]
  }
  
  type ScanProfile {
    id: ID!
    name: String!
    Assets: [Asset]
  }
  
  type Query {
    Asset(id: ID!): Asset
    ScanProfile(id: ID!): Asset
  }`;
  
  // Some generic resolvers...
  const resolvers = {
    Asset: (root, args, context) =&gt; context.get('asset', args),
    ScanProfile: (root, args, context) =&gt; context.get('scanProfile, args),
    Query: {
      Asset: (root, args, context) =&gt; context.get('asset', args),
      ScanProfile: (root, args, context) =&gt; context.get('scanProfile', args)
    }
  };
  
  const schema = makeExecutableSchema({typeDefs, resolvers
  
  const joinResolvers = {
    Asset: {
      ScanProfiles: (root, args, context) =&gt; { 
        console.log(root.ScanProfiles);
        return root.ScanProfiles.map(id =&gt; context.get('scanProfile', {id});
      }
    },
    ScanProfiles: {
      Assets: (root, args, context) =&gt; {
        console.log(root.id);
        return context.filter('asset', {ScanProfiles: ({ScanProfiles}) =&gt; ScanProfiles.includes(root.id)}); 
      }
    }
  };
  
  addResolveFunctionsToSchema({ schema, resolvers: joinResolvers });
  
  </code></pre>
  
  <p>I expect <code>context.get</code> for a given id to return these shapes:</p>
  
  <pre><code>// Asset
  {
    id: '1234',
    name: 'abcd',
    ScanProfiles: ['5678', '5679']
  }
  //ScanProfile
  {
    id: '5678',
    name: 'efgh'
  }
  </code></pre>
  
  <p>Console is returning <code>[null]</code> for <code>Asset.ScanProfiles</code>.</p>
  
  <p>The root resolvers return the fields as an array of strings, but when the root is then passed to the <code>joinResolvers</code> those files are then null. I'm assuming because they don't match the defined typeDefs.</p>
  
  <p>To work around this, I'm having to make a separate call to re-get the parent and then extract the stored vales for the child.</p>
  
  <p>Am I defining my type incorrectly? Am I structuring my resolvers wrong?</p>