public CarQuery(ICarDatabase db) { this.db = db; Field <ListGraphType <CarGraphType> >("cars", "Query to retrieve all cars", resolve: GetAllCars); Field <CarGraphType>("car", "Query to retrieve a specific car", new QueryArguments(MakeNonNullStringArgument("registration", "The registration (licence plate) of the car")), resolve: GetCar); Field <ListGraphType <CarGraphType> >("carsByColor", "Query to retrieve all cars matching the specified color", new QueryArguments(MakeNonNullStringArgument("color", "The name of a color, eg 'blue', 'grey'")), resolve: GetCarsByColor); }
public CarsController(ICarDatabase database, ILogger <CarsController> logger) { this.database = database; this.logger = logger; }
public AutobarnSchema(ICarDatabase db) => Query = new CarQuery(db);
public CarsController(ICarDatabase db, IBus bus) { this.db = db; this.bus = bus; }
public CarModelsController(ICarDatabase db) { this.db = db; }