Letβs take a look at one of the practices that are widely adopted when working with GraphQL.
Thread π§΅ππ»
GraphQL Schema Stitching is the process of creating a single GraphQL schema from multiple underlying GraphQL APIs.
You can use two or more GraphQL schemas and merge them into one endpoint to get data from all the underlying schemas.
It provides you with a unified API that you can use to query multiple GraphQL schemas simultaneously.
You can also use it to customize an existing GraphQL API.
With GraphQL, you do not have to wait for a single request to resolve to fetch new data based on the response of the previous request. You can just query all the data at once to one schema.
As the schema grows, you might want to break it up into modules that can develop independently.
With `sitchSchemas`, you can combine multiple GraphQL APIs into one unified gateway proxy schema.
It knows how different parts of the schema works, and because of this, it delegates portions of the requests to the relevant underlying subschemas.
π Use case of Schema Stitching
πΉ You can stitch internal schemas with other internal schemas to ease deployment or versioning.
πΉ You can integrate different services by adding public APIs to your schema.
πΉ You can create a mashup API by combining multiple public APIs.
β’ β’ β’
Missing some Tweet in this thread? You can try to
force a refresh
There are different kinds of specifications available that you can use while building an API.
In this thread, we will talk about the OpenAPI spec.
𧡠ππ»
In simple terms, OpenAPI spec is a format to define structure and syntax for REST APIs.
OpenAPI spec provides a standard that allows both humans and computers to discover and understand the service's capabilities without access to source code, documentation, or traffic inspection