menu
Channels
# All channels
view-forward
# General
view-forward
# Apollo Angular
view-forward
# Announcements
view-forward
# Apollo Android
view-forward
# Apollo Client
view-forward
# Apollo iOS
view-forward
# Apollo Link
view-forward
# Apollo Link Rest
view-forward
# Local State
view-forward
# Apollo Platform
view-forward
# Apollo Server
view-forward
# Apollo Tooling
view-forward
# Contributing
view-forward
# Docs
view-forward
# Events
view-forward
# GraphQL Tools
view-forward
# Jobs
view-forward
# Random
view-forward
# React Apollo
view-forward
# Showcase
view-forward
# Subscriptions
view-forward
# Testing
view-forward
# Vue Apollo
view-forward
Team

Apollo Gateway in managed mode causes some errors

November 8, 2019 at 11:10pm

Apollo Gateway in managed mode causes some errors

November 8, 2019 at 11:10pm (Edited 7 months ago)
As the docs on managed federation say, if no arguments are provided to the ApolloGateway constructor, it should automatically pick up the ENGINE_API_KEY environment variable, connect to Apollo Engine and get all registered services. However, I am getting the following output:
- apollo-gateway: Error checking for schema updates. Falling back to existing schema. Error: When `serviceList` is not set, an Apollo Engine configuration must be provided.
- apollo-gateway: Gateway successfully loaded schema.
- Mode: managed
- UnhandledPromiseRejectionWarning: Error: Expected undefined to be a GraphQL schema.
Any suggestions what I am doing wrong?

January 8, 2020 at 4:27am
I've been getting the exact same error for days. From the documentation: When you initialize your Apollo gateway with a Graph Manager apiKey instead of a serviceList... I'm assuming they are referring to when you pass in an API key to the Apollo Server? I'm not sure. The documentation surrounding these features is poor.
  • reply
  • like

January 31, 2020 at 10:30pm
Hi ... I have the same problem. According to the documentation I think this should be all.. I also debugged the code of the Gateway... there is a loadServicesFromStorage() implementation, that basically connects to Google Storage (GCS) and tries to download the latest schema... it uses the engine api key provided by the env-variable (this works) and it is able to download a secret in the first step. Then the Gateway composes a new Google Storage URL using that secret and tries to download a "composition-config-link", which fails in my case with a AccessDenied Response from GCS. The next step would be to finally download the service definitions, but this is not happening due to the failure before... In general I expect that this is a misconfiguration of Apollo with their Google Storage items (?)... or the managed mode is not really fully implemented / released by apollo and thus not working yet at all ? I have not found anyone in the web yet, that has made it work... btw. I tried with the latest gateway (0.11.7)
  • reply
  • like

February 4, 2020 at 10:41pm
Found a solution now... for anyone having the same problem: https://github.com/apollographql/apollo-server/issues/3753
  • reply
  • like

April 16, 2020 at 3:48pm
unfortunately that did not solve it for me. Very frustrating.
  • reply
  • like