For a contained ecosystem, rolling deprecation feature might be useful.
type Greeting {
value: String!
x: Int @since("0.2.0") @deprecated("0.3.0") @remove("0.4.0")
number: Long @since("0.3.0")
}
This could generate
object Greeting {
// 0.0.0
def apply(value: String): Greeting = new Greeting(value, None, None)
// 0.2.0
@deprecated
def apply(value: String, x: Int): Greeting = new Greeting(value, Some(x), None)
// 0.3.0
def apply(value: String, number: Long): Greeting = new Greeting(value, None, Some(number))
}
Once 0.4.0 is reached, remove the field altogether:
object Greeting {
// 0.0.0
def apply(value: String): Greeting = new Greeting(value, None)
// 0.2.0
def apply(value: String, x: Int): Greeting = Macro.restligeist("0.2.0 apply no longer exists.")
// 0.3.0
def apply(value: String, number: Long): Greeting = new Greeting(value, Some(number))
}
For a contained ecosystem, rolling deprecation feature might be useful.
This could generate
Once 0.4.0 is reached, remove the field altogether: