10 Tweets 1 reads Sep 08, 2022
What exactly is API versioning?
Thread:
API versioning is the practice of managing changes in your API.
You should version your API if you are introducing any breaking changes.
Clients can still access the old version, and their products won't break as soon as you launch a new release.
There are three different types of versioning strategies: 👇🏻
1️⃣ URI versioning
This is the most common versioning strategy, although it violates every URI should contain a unique resource.
2️⃣ Query parameters versioning
This strategy states the version of an API by using query parameters. An example of this kind of strategy can be the following: 👇🏻
3️⃣ Custom headers versioning
Versioning can also be done by passing custom request headers. An example will be the following:
Although, versioning is recommended for all the APIs.
But it is recommended to keep GraphQL APIs versionless.
No need to create breaking changes as GraphQL returns explicitly requested data.
New data can be added using new fields and types. Hence no need to implement versioning.
Versionless is the most underrated benefit of GraphQL.
With that being said, this is the end of this thread.
Follow @Rapid_API for more exciting content like this one. 🐙 💙

Loading suggestions...