The main goal of Yoga v2 is to allow you to leverage all the GraphQL ecosystem by being compatible with most of the existing schema-design, HTTP server libraries, and deployment environments.
Hey 👋
I thought it was worth hunting GraphQL Yoga 2 in the Developer Tools category. It's been part of my GraphQL server stack for a few months now (even during alpha/beta).
The Guild have done an amazing job at rebuilding Yoga from the ground up, introducing a bunch of new features, and making it one of the fastest ways to build your own GraphQL server.
What I love about GraphQL Yoga:
* Yoga follows the HTTP specification, and tightly couples with the Request/Response objects that make it work on any platform.
* Yoga also makes it easy to extend with Envelop. Add authentication, caching, error reports, rate limiting, and more with dozens of Envelop plugins.
* GraphQL Subscriptions are built-in using Server Sent Events. Instead of the traditional websocket based subscriptions, Yoga works out of the box with SSE for super cool subscription workflow.
* Yoga also makes it easy to work with File Uploads without any additional packages.
* Supports Apollo Federation, and their supergraph, if that's your thing.
Finally there's also a bunch of examples over on GitHub that the team have made. It shows how Yoga works with all of the popular deployment platforms, frontend and backend frameworks, as well as all of the features Yoga has built-in.
Over to @urigoldshtein@n1rual@whereischarly@dotansimha1@ardatanrikulu@kamilkisiela@singh_saihaj@jycouet and team to answer any questions 🙏🏻
@n1rual@whereischarly@dotansimha1@ardatanrikulu@kamilkisiela@singh_saihaj@jycouet@notrab@oren_mizrahi Great question!
You have a couple of options:
1. Use Apollo Federation itself: Yoga supports running Apollo Subgraph and the Supergraph/Gateway. That means you are tapping into the Apollo Ecosystem while still enjoying the Envelop Plugin Ecosystem at the same time! Here are the docs for that: https://www.graphql-yoga.com/doc...
2. You can use GraphQL Tools' Schema Stitching: Schema Stitching fully supports the Federation standard and you can merge services using Federation's directives, Stitching configurations or both of them together. It is the most flexible solution: https://www.graphql-tools.com/do...
3. Use GraphQL Mesh: GraphQL Mesh adds another layer on top of these solution where it can not only federate GraphQL services, but it can take any other API service (REST/OpenAPI/Swagger/gRPC/SOAP and others), convert them into a GraphQL representation and federate them as well! (and uses Yoga under the hood...) Check out our new introductory docs: https://www.graphql-mesh.com/doc....
Another cool thing with Mesh and Stitching is that you can do all of the above but instead of running the merged services as a gateway, you can also run it as an SDK on the client and sub-services. So you can basically create a decentralised Federation!
We use GraphQL Yoga underneath RedwoodJS, and its beautifully simple to use - while giving us all the power we (and our users need) by making it easy to extend with envelop plugins.
But.... most of all, the team behind Yoga are truly the secret sauce - The Guild are knowledgable, talented, friendly and very aware of what's happening in the JS-GraphQL ecosystem - with a keen eye for solving problems we face day to day and such prolific contributors to the open source world.
@dannychoudhury Thank you for your kind words :) the truth is it is a pleasure to work with you and we've learned so much from the RedwoodJS team and community!
Headless Dropshipping Starter
GraphQL Yoga
RedwoodJS
GraphQL Yoga