title: Apollo gateway not picking up managed federation configurations
body: <p>This could be quite new to everyone but hoping for the best to find out the solution.</p>
  
  <p>I've been trying to setup apollo managed federation through ApolloGateway for federated my services by following the official documentation. <a href="https://www.apollographql.com/docs/graph-manager/managed-federation/setup/#4-deploy-the-modified-gateway" rel="nofollow noreferrer">https://www.apollographql.com/docs/graph-manager/managed-federation/setup/#4-deploy-the-modified-gateway</a></p>
  
  <p>.env</p>
  
  <pre><code>NODE_ENV=development
  APOLLO_KEY=service:service_name:hash
  </code></pre>
  
  <p>ApolloGateway</p>
  
  <pre><code>import 'reflect-metadata';
  import express from 'express';
  import {ApolloServer} from 'apollo-server-express';
  import {ApolloGateway} from '@apollo/gateway';
  import {config} from 'dotenv';
  config();
  
  const port = process.env.NODE_PORT || 7000;
  const nodeEnv = process.env.NODE_ENV || 'localhost';
  const nodeHost = process.env.NODE_HOST || 'http://localhost';
  const apolloGatewayConfig: any = {
    __exposeQueryPlanExperimental: false,
  };
  if (nodeEnv === 'localhost' || true) {
    apolloGatewayConfig.serviceList = [
      {
        name: 'vendors',
        url: `${process.env.GMS_VENDORS_NODE_HOST}/graphql`,
      }
    ];
  }
  const gateway = new ApolloGateway(apolloGatewayConfig);
  
  (async () =&gt; {
    const app = express();
    app.get('/health', (_, res: any): void =&gt; {
      res.send({gateway: true});
    });
  
    const {schema, executor} = await gateway.load(); // breaking point
    const server = new ApolloServer({
      schema,
      executor,
      engine: true,
      subscriptions: false,
    });
    server.applyMiddleware({app, path: '/graphql'});
  
    app.listen({port}, () =&gt;
      console.log(`API Gateway is ready at ${nodeHost}:${port}`)
    );
  })();
  </code></pre>
  
  <p>at line <code>const {schema, executor} = await gateway.load();</code> it throws an error</p>
  
  <p><code>UnhandledPromiseRejectionWarning: Error: When</code>serviceList<code>is not set, an Apollo Engine configuration must be provided.</code></p>
  
  <p>I've been following official docs but not sure what am I missing here?</p>