prisma-labs / graphql-framework-experiment

Code-First Type-Safe GraphQL Framework
https://nexusjs.org
MIT License
673 stars 66 forks source link

Federation/Microservices Support #863

Open nklayman opened 4 years ago

nklayman commented 4 years ago

Related: https://github.com/graphql-nexus/schema/issues/148

Perceived Problem

If you don't know what microservices are: https://microservices.io/

Currently, a Nexus server can only be easily implemented as a monolith. This can cause issues for large scale deployments with many teams working on the code. By using a microservices-based architecture, teams can work independently on their own server, package it as a container, and deploy it along with many other "microservices" (servers) to form a complete API. There are many other benefits to microservices (and some drawbacks), see the link above for more details. Tools like Apollo Federation allow multiple graphql servers to be stiched together to expose a single graph that functions like a monolith server. This makes it really easy to create a microservices-based api.

Ideas / Proposed Solution(s)

Support the Apollo Federation specification or create a new specification that allows multiple nexus servers to be stitched together to expose a single graph.

I really love the code-first approach of Nexus and the great Prisma 2 integration, but Apollo Federation is just too good to give up. I really hope I'll be able to use Nexus one day, keep up the great work with this project!

ManAnRuck commented 4 years ago

šŸ¤© this would be awesome if nexus/prisma works in combination with Apollo Federation!

sanderkooger commented 4 years ago

We are just in the beginning stages of development for an app that runs a microservice backend. We choose for a federated gateway to be able to give developers ownership over the types for their part of the GQL schema. We too would really like to see federation support being ported to Nexus.

paniavula commented 4 years ago

first class support for apollo federation (or an equivalent) would simplify quite many things. Since we now switched to apollo server, I hope this can be achieved soon.