You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 16, 2019. It is now read-only.
type<VehicleResponse> {
description = "Gadget returned from original GadgetProxy"
property(VehicleResponse::gadget) {
description = "Integer value representing type of vehicle"
}
property<InventoryParts?>("inventory") {
resolver { response, fromDate: LocalDate ->
getInventoryParts(response.gadget.stockNumber, fromDate)
}
}
}
I also have :
query("getInventory") {
description = "Returns the parts from the inventory."
resolver { stockNumber: String, fromDate: LocalDate ->
getInventoryParts(stockNumber, fromDate)
}.withArgs {
arg<String> { name = "fromDate"; description = "Date to check inventory stock" }
}
}
As you can see there is a bit of duplication (getInventoryParts). So my question is am I using the resolver correctly when defining the schema or can I some how from VehicleResponse go to query("getInventory") rather than creating a resolver in my VehicleResponse type?
The text was updated successfully, but these errors were encountered:
This looks correct. All your logic would be in the getInventoryParts function, so calling it from different places is perfectly fine and the recommended way.
I have the following type which contains:
I also have :
As you can see there is a bit of duplication (getInventoryParts). So my question is am I using the resolver correctly when defining the schema or can I some how from VehicleResponse go to query("getInventory") rather than creating a resolver in my VehicleResponse type?
The text was updated successfully, but these errors were encountered: