Last active
December 5, 2020 08:03
-
-
Save xperiandri/3fe6ef563ecc0e9e44ec4212a7d6ac6e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let asyncGetGrupo (ctx : ResolveFieldContext) _ = asyncResult { | |
let container = ctx.Root.BibliotekoDatabase.GrupojContainer | |
let! grupoId = ctx.ArgId | |
return! asyncGetGrupo container grupoId |> AsyncResult.mapError ErrorMappings.mapGrupoError | |
} | |
public Task<Grupo> GetGrupoAsync(ResolveFieldContext: ctx, Root: _) | |
{ | |
var cointainer = ctx.Root.BibliotekoDatabase.GrupojContainer; | |
Guid grupoId = ctx.ArgId ?? throw new ArgumentNullException("id"); | |
return await GetGrupoAsync(container, grupoId); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment