title: Getting Cannot read property 'args' of undefined when trying to stitch schema's with apollo server
body: <p>There seem to be some similar questions but none at the same point as where I get the error and none with the 'args' of undefined.</p>
  
  <p>I've gotten it to work to have multiple other graphql apis and merge them. Just mergin them is going well but when I try to make a stitch I get the error shown below:</p>
  
  <pre><code>"errors": [
  {
    "message": "Cannot read property 'args' of undefined",
    "locations": [
      {
        "line": 9,
        "column": 9
      }
    ],
    "path": [
      "flows",
      "edges",
      0,
      "node",
      "sourceAddresses"
    ],
    "extensions": {
      "code": "INTERNAL_SERVER_ERROR",
      "exception": {
        "stacktrace": [
          "TypeError: Cannot read property 'args' of undefined",
          "    at /opt/node_modules/graphql-tools/src/transforms/AddArgumentsAsVariables.ts:103:15",
          "    at Array.forEach (&lt;anonymous&gt;)",
          "    at /opt/node_modules/graphql-tools/src/transforms/AddArgumentsAsVariables.ts:95:39",
          "    at Array.map (&lt;anonymous&gt;)",
          "    at addVariablesToRootField (/opt/node_modules/graphql-tools/src/transforms/AddArgumentsAsVariables.ts:66:36)",
          "    at AddArgumentsAsVariablesTransform.transformRequest (/opt/node_modules/graphql-tools/src/transforms/AddArgumentsAsVariables.ts:31:11)",
          "    at /opt/node_modules/graphql-tools/src/transforms/transforms.ts:24:21",
          "    at Array.reduce (&lt;anonymous&gt;)",
          "    at Object.applyRequestTransforms (/opt/node_modules/graphql-tools/src/transforms/transforms.ts:21:21)",
          "    at /opt/node_modules/graphql-tools/src/stitching/delegateToSchema.ts:90:28"
        ]
      }
    }
  }
  </code></pre>
  
  <p>]</p>
  
  <p>I've got a schemaRetriever service that retrieves the schemas from 3 GraphQL Api's. For now I'm trying to get 1 stitch working so the code isn't really 'nice' at the moment.</p>
  
  <p>Here is the piece of code where I try to get a stitch going:</p>
  
  <pre><code>    const aSchema = await this.schemaRetrieverService.retrieveASchema();
  const housesSchema = await this.schemaRetrieverService.retrieveHousesSchema();
  const addressSchema = await this.schemaRetrieverService.retrieveAddressSchema();
  
  return mergeSchemas({
    schemas: [
      aSchema,
      housesSchema,
      addressSchema,
          `
      extend type Houses {
        houseAddresses: Addresses
      }
  
      extend type Addresses {
        houses: Houses
      }
  
      type Query {
        addressByHouseId(id: ID!): Addresses
      }
    `
    ],
    resolvers: {
      Houses: {
        houseAddresses: {
          fragment: `... on Houses { id }`,
          resolve(house, args, context, info) {
            return info.mergeInfo.delegateToSchema({
              schema: addressSchema,
              operation: 'query',
              fieldName: 'addressByHouseId',
              args: {
                id: house.houseAddress,
              },
              context,
              info,
            });
          },
        },
      },
    },
  });
  </code></pre>
  
  <p>I've verified that 'house.houseAddress' contains the correct ID that is needed and I keep getting the same error although I'm putting a valid ID in the args variable. Am I missing something small here? or big? If someone could give me a pointer I would be so grateful.</p>
  
  <p>Many thanks in advance and if any information is missing please let me know I'll try to add all necessary info.</p>