You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When instantiating a new ApolloGateway, buildService() is called only once per serviceList item. This issue is confusing, and I am not sure if there's some underlying bug I am creating in the ApolloGateway by this happening twice?
Currently, buildService is being called twice for each service on
gateway startup. This is because we're caching the datasources,
but failing to utilize the cache.
This commit places the creation and caching of datasources in one
place, and indicates this more clearly with an updated function
name.
Fixes#3367
abernix
pushed a commit
to apollographql/federation
that referenced
this issue
Sep 4, 2020
…3388)
Currently, buildService is being called twice for each service on
gateway startup. This is because we're caching the datasources,
but failing to utilize the cache.
This commit places the creation and caching of datasources in one
place, and indicates this more clearly with an updated function
name.
Fixesapollographql/apollo-server#3367
Apollo-Orig-Commit-AS: apollographql/apollo-server@edbc829
Packages
Expected behavior
When instantiating a new
ApolloGateway
,buildService()
is called only once perserviceList
item. This issue is confusing, and I am not sure if there's some underlying bug I am creating in theApolloGateway
by this happening twice?Actual Behavior
buildService()
is called twiceReproduction
Fork of the
federation-demo
repo:bwhitty/federation-demo@a424d3d#diff-ddf0120dcc313c390b98286c8b648109R12-R16
This logs out each call, and you will see every service is called twice:
The text was updated successfully, but these errors were encountered: