Alex Lange
04/24/2023, 6:48 PM@KeyDirective(FieldSet("id"))
class Product(val id: String) {
@ExternalDirective
var weight: Double by Delegates.notNull()
@RequiresDirective(FieldSet("weight"))
fun shippingCost(): String { ... }
}
in the reference resolver for Product
, we would have to set the weight
var there by checking for the weight
value in the representation
?Dariusz Kuc
04/24/2023, 7:06 PMDariusz Kuc
04/24/2023, 7:06 PMAlex Lange
04/25/2023, 7:48 PM