41
A New Year for GraphQL Schema Stitching
This article was published on 2021-01-14 by Greg MacWilliam @ The Guild Blog
If you'd told me eight months ago that I'd end up writing a book on Schema Stitching, I wouldn't have believed it.
That's because eight months ago my team was trying to mature an old GraphQL prototype into a formal API product, and our dependence on Schema Stitching v4 (a famously abandoned project of Apollo) imposed numerous bugs, limitations, and performance bottlenecks on our work. I researched transitioning to the newer Apollo Federation as a solution to these woes, but the involved migration path proved too daunting for our immediate time constraints.
Something remarkable happened at this critical juncture for my team...
During these development cycles, numerous missing Stitching features were identified and added: batch execution for consolidating sub-service requests, computed fields for encapsulating service concerns, interface proxies for bridging interfaces across services, and schema directives for configuring stitched schemas via SDL annotations. Also, the library documentation was rewritten from top-to-bottom for a new generation of users.
Coming into 2021, Schema Stitching has been revitalized into an un-opinionated library capable of building an opinionated framework like Apollo Federation. If you want out-of-the-box workflows, Federation is the tool for you. Otherwise, Stitching is the comparable alternative that keeps you in control of your full system architecture.
The tricky thing about the self-service nature of Schema Stitching is that its usage extends beyond just the scope of library documentation. To bridge this knowledge gap, the Schema Stitching Handbook was started as a companion guide that walks through building stitching libraries into practical applications. The content is split into a few major sections:
The Handbook is versioned as a living repo to provide a comprehensive guide that may evolve with the library. We look to you, fellow developers, to contribute your own discoveries of how Schema Stitching integrates with tools and languages that we haven't explored yet.
Whether you're planning a new API project, looking to migrate an existing one, or curious of alternatives for your current distributed GraphQL architecture, 2021 is the year to give Schema Stitching a fresh look. Read the new documentation, review the handbook, watch the video series, or join us for a conversation to learn about the exciting progress that was made last year.
41