2

I'm going nuts with this as it sounds so simple.

I started from this project: https://github.com/apollographql/federation-demo Then I created an account on https://engine.apollographql.com where I registered the different federated services. I've a ENGINE_API_KEY for the Gateway as well.

Fantastic, I can see traffic registered in the Engine!

The next step is apparently to remove the "serviceList" from the config object in the ApolloGateway constructor. When the gateway starts it gives the following message: When `serviceList` is not set, an Apollo Engine configuration must be provided.

What shall I do? What is an "Apollo Engine configuration" and how can I provide it?

Zerzio
  • 237
  • 3
  • 11

1 Answers1

0

After wasting a lot of time I found out that engine needs to be set to true. The hint was right there in the comments!


(async () => {
  const server = new ApolloServer({
    gateway,
    // Apollo Graph Manager (previously known as Apollo Engine)
    // When enabled and an `ENGINE_API_KEY` is set in the environment,
    // provides metrics, schema management and trace reporting.
    engine: true,
  });
Suraj Bajaj
  • 6,630
  • 5
  • 34
  • 49