Example #1
0
 public LocationQueries(LocationReadClient locationReadClient)
 {
     FieldAsync <LocationType>("location",
                               "a location",
                               new QueryArguments(new QueryArgument(typeof(StringGraphType))
     {
         Name = "code"
     }),
                               async ctx => await ctx.TryAsyncResolve(async context =>
                                                                      await locationReadClient.GetLocationAsync(
                                                                          new LocationRequest
     {
         LocationCode = ctx.Arguments["code"].ToString()
     }
                                                                          )
                                                                      ));
 }
 public VehicleLocationResolver(LocationReadClient locationReadClient) => _locationReadClient = locationReadClient;