DEV Community

loading...

What is GraphQL schema stitching & why do I need it?

David Wells
Full Stack Developer focusing on Serverless Architectures, UX, & Product
・1 min read

Explain it to me like I'm five!

What's are they and why do you need them when working with graphQL?

Discussion (1)

Collapse
kbariotis profile image
Kostas Bariotis • Edited

Schema stitching is about merging two different GraphQL endpoints into one by just introspecting the two schemas and figuring out the new schema. What's also possible is that we can now create links between those two schemas so the new resulting schema will work seamlessly with both of them without exposing the difference to the client.

This is a very good example of how that will work.

At first, GraphQL was born to allow you to aggregate other APIs into one. As more people started to expose GraphQL APIs of their own, there is now the need to aggregate these APIs and a single GraphQL makes total sense.

You don't need them though unless you need to aggregate other GraphQL APIs.

Refs: