Distributed GraphQL with Hot Chocolate Fusion
In this recipe, we will explore the most powerful way to stitch schemas in Hot Chocolate v14 – Fusion. GraphQL Fusion represents a modern approach to distributed GraphQL, allowing you to combine multiple GraphQL services into a unified API through a gateway pattern. Unlike traditional schema stitching, Fusion is built from the ground up to support distributed systems and is now backed by the GraphQL Foundation as an open specification for federated GraphQL. The starter project contains two completely independent GraphQL APIs. We will unify the schema of these two independent APIs through a new GraphQL gateway. This makes it easy to combine multiple APIs, even APIs running different tech stacks, into a single GraphQL endpoint to be consumed by clients.
Getting ready
The starter project for this recipe can be found here: https://github.com/PacktPublishing/ASP.NET-9-Web-API-Cookbook/tree/main/start/chapter08/Fusion.
This starter...