Allow for Scatter-Gather Requests #1933
zackerydev
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! 👋
I am having a great time at Apollo Summit so far! And I've been loving trying out the new router. I have a somewhat complex problem that I am trying to achieve with the new Apollo Router and I will try to explain it with an app I've been testing out called "Alexandria".
This is the public studio link
https://studio.apollographql.com/public/alexandria-supergraph/home?variant=prod
This my Supergraph, the router is running on GraphOS and the individual services are fly.io apps here:
https://alexandria-profiles.fly.dev/ (Has one user: me!)
https://alexandria-profiles-eu.fly.dev/ (Has one user named "British Guy")
Notably, these two graphs are identical
The purpose of these two graphs is to store user PII in a specific geography. EU users exist in a
fly.dev
app in London, and US users exist in afly.dev
app in the USA.What I would like is for users of the supergraph to be able to run:
And get back this object:
I am very new to Rust, and I'm not sure if this would be possible with a native router feature. There are a couple considerations here:
@broadcast
or@global
directive that says to aggregate results acrossrover
to register theeu
URL since it has the exact same schema. I think this feature would only be doable in that instance.Obviously there might be better patterns around this which I am open to learning about as well. The lack of this feature is causing us to struggle with adopting Federation across our globally replicated data-centers. We have to keep all this data separate for compliance reasons.
Someone at Apollo Summit mentioned to make Discussions before trying to implement it ourselves. I don't know enough Rust to know if this is even a plugin I should invest time into but I'm curious what everyone in the community's thoughts are!
Beta Was this translation helpful? Give feedback.
All reactions