-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Export Stable Schema Generation #1640
Comments
I think isolating the server-agnostic parts of the |
Apollo has been moving away some licenses from MIT recently and there are some growing concerns in the community about it. I think it's becoming increasingly important to break the tight coupling and give users a choice about this. Pinging @kamilmysliwiec for visibility. |
First and foremost, switching over to Nest.js has been amazing for our company, especially utilizing
@nestjs/graphql
. We've come to realize the necessity to have higher throughput servers though andapollo-server
has been quite a bottle netck in some cases and we can do better.Apollo Server with Express is pretty terrible, especially with tracing enabled. Apollo Server with Fastify is 2x faster than with express. But going further, other GraphQL building blocks are emerging which provide a ton more performance wins than Apollo Server.
Reference: https://github.com/benawad/node-graphql-benchmarks
I understand Nest is coupled to
express
orfastify
right now, so you're limited to those. i'm also not sure how much of a performance impact you'd get in the nest ecosystem if you switched to a different GraphQL execution library/server. I know you can usegraphql-jit
using custom executors in Express, so there's that to try.But going beyond "performance" being the motivator. Apollo has been rubbing us the wrong way ever since they've been commercializing their product. Federation is a cool thing and glad they've implemented it, but it's slow with features and other people are making arguably better versions (GraphQL tools schema stitching is back and alive), and "Mercurius" (the superior IMO GraphQL server framework).
The best example of what I'm wanting is @Davide-Gheri's attempt at pulling in the
@nestjs/graphql
tools for schema generation, however it's pretty fragile (https://github.com/Davide-Gheri/nestjs-mercurius). When internal tools change and break, his library breaks. He has to lock to a specific version. Updates are a pain and hard as well.I think in a perfect world,
@nestjs/graphql
would be a GraphQL schema generation library focusing on connecting Nest.js to GraphQL resolvers, and create a second@nestjs/apollo
library to implement the server. Or just keep it all in@nestjs/graphql
but keep apollo optional and export a schema generation module?I just wanted to see if there was any interest with this so that people can start building better GraphQL implementations without re-inventing the wheel.
The text was updated successfully, but these errors were encountered: