Replies: 1 comment 7 replies
-
Can you give a more precise example? What you're asking for sounds close to what |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We've been using Apollo federation for about 1.5 years as our main api. Behind the federation gateway are 6 child services which are all combined at the gateway. This configuration is really excellent when you have a result set of data where you want to hang one data type off of another. For example a list of orders off of a member record.
One place we have experience this breaking down is when a pre-set of data is needed which is already defined in another resolver/path. There is no way (that has been discovered by us) to query the federation from a child to get a federated set of data for use by a resolver to other work with that data.
One crazy thought which came up today is setup a
apollo-datasource-rest
dataSource which calls into our gateway to make a federated query which then that set of data can be acted on by the calling resolver to do whatever. So yes a child service would make a call into the graph gateway endpoint to query data for it's use, utilizing all the beauty which is Apollo Federation stitching all those different types together.Is this a really bad idea? Is it a plausible idea? Has anyone tried something like this before?
What we are trying to avoid is having a repeated set of queries in child services to get details which are already available in other services.
Thank you for your time and consideration.
Beta Was this translation helpful? Give feedback.
All reactions