|
| 1 | +--- |
| 2 | +id: semver |
| 3 | +title: Our backward compatibility promise |
| 4 | +sidebar_label: Semantic versioning |
| 5 | +--- |
| 6 | + |
| 7 | +Ensuring smooth upgrades of your project is a priority. That's why we promise you backward compatibility (BC) for all |
| 8 | +minor GraphQLite releases. You probably recognize this strategy as [Semantic Versioning](https://semver.org/). In short, |
| 9 | +Semantic Versioning means that only major releases (such as 4.0, 5.0 etc.) are allowed to break backward compatibility. |
| 10 | +Minor releases (such as 4.0, 4.1 etc.) may introduce new features, but must do so without breaking the existing API of |
| 11 | +that release branch (4.x in the previous example). |
| 12 | + |
| 13 | +But sometimes, a new feature is not quite "dry" and we need a bit of time to find the perfect API. |
| 14 | +In such cases, we prefer to gather feedback from real-world usage, adapt the API, or remove it altogether. |
| 15 | +Doing so is not possible with a no BC-break approach. |
| 16 | + |
| 17 | +To avoid being bound to our backward compatibility promise, such features can be marked as **unstable** or **experimental** |
| 18 | +and their classes and methods are marked with the `@unstable` or `@experimental` tag. |
| 19 | + |
| 20 | +`@unstable` or `@experimental` classes / methods will **not break** in a patch release, but *may be broken* in a minor version. |
| 21 | + |
| 22 | +As a rule of thumb: |
| 23 | + |
| 24 | +- If you are a GraphQLite user (using GraphQLite mainly through its annotations), we guarantee strict semantic versioning |
| 25 | +- If you are extending GraphQLite features (if you are developing custom annotations, or if you are developing a GraphQlite integration |
| 26 | + with a framework...), be sure to check the tags. |
| 27 | + |
| 28 | +Said otherwise: |
| 29 | + |
| 30 | +- If you are a GraphQLite user, in your `composer.json`, target a major version: |
| 31 | + ```json |
| 32 | + { |
| 33 | + "require": { |
| 34 | + "thecodingmachine/graphqlite": "^4" |
| 35 | + } |
| 36 | + } |
| 37 | + ``` |
| 38 | +- If you are extending the GraphQLite ecosystem, in your `composer.json`, target a minor version: |
| 39 | + ```json |
| 40 | + { |
| 41 | + "require": { |
| 42 | + "thecodingmachine/graphqlite": "~4.1.0" |
| 43 | + } |
| 44 | + } |
| 45 | + ``` |
| 46 | + |
| 47 | +Finally, classes / methods annotated with the `@internal` annotation are not meant to be used in your code or third-party library. |
| 48 | +They are meant for GraphQLite internal usage and they may break anytime. Do not use those directly. |
0 commit comments