public async Task <Observation> ReplyToObservationAsync( [GraphQLType(typeof(ReplyToObservationInputType))][GraphQLName("input")] ReplyToObservationCommand input, [Service] ISheaftMediatr mediatr, ObservationsByIdBatchDataLoader dataLoader, CancellationToken token) { await ExecuteAsync(mediatr, input, token); return(await dataLoader.LoadAsync(input.ObservationId, token)); }
public async Task <Observation> CreateObservationAsync( [GraphQLType(typeof(CreateObservationInputType))][GraphQLName("input")] CreateObservationCommand input, [Service] ISheaftMediatr mediatr, ObservationsByIdBatchDataLoader dataLoader, CancellationToken token) { var result = await ExecuteAsync <CreateObservationCommand, Guid>(mediatr, input, token); return(await dataLoader.LoadAsync(result, token)); }