apollographql / federation-demo

Federation 2 supersedes this demo and this example is no longer the newest. See https://www.apollographql.com/docs/federation/ for migration steps!
https://www.apollographql.com/docs/federation/
MIT License
502 stars 200 forks source link

Extend example with GraphQL microservices #6

Open Enalmada opened 4 years ago

Enalmada commented 4 years ago

It would be helpful to extend this demo with federation to a 3rd party GraphQL endpoint that doesn't implement the federation spec. I am new to Apollo and can't find any examples of how someone who knows what they are doing would properly implement federation with an existing 3rd party graphql endpoint. I feel like this federation-demo would be exponentially more educational with at least one of the microservices doing that.

Would an example use https://github.com/poetic/apollo-datasource-graphql? It seems too lightly documented and no working examples come up in google so I suspect people are not doing that.

Is the recommendation to do a microservice with apollo client like this alludes to? https://spectrum.chat/apollo/apollo-federation/remote-schemas-and-apollo-federation~74f89ac9-2623-4c51-bb87-8880a140fc27?authed=true

In my case, I need go from connecting direct to the shopify storefront graphql api to federating it. The shopify endpoint is huge and complex. I am scared of spending a ton of time doing federation to a 3rd party GraphQL endpoint the wrong way.

Just seeing a simple example of a federated 3rd party GraphQL endpoint done right would really help new users like me get going.

squarewave24 commented 4 years ago

I am currently assessing if i can use this framework with non Apollo graphql server such as https://github.com/graphql-python/flask-graphql

any insight would be appreciated!