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; |
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 InputRegistriCultureType = | |
Define.InputObject<RegistriCulture> | |
(name = "InputCulture", | |
fields = | |
[ Define.Input ("kind" , String , description = "A kind of book culture: native or translated") | |
Define.Input ("culture", CultureInfoType, description = "A culture code of a book") ]) | |
// C# | |
// Define.Input (name: "kind", type: String, defaultValue: null, description: "A kind of book culture: native or translated") |
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
// static var Mutation = Define.Object<Root>(...) | |
let Mutation = | |
Define.Object<Root> ( | |
... | |
fields = [ Define.AsyncField ( | |
... | |
inputs = [ Define.Input ("command", SetCommentInputType) ], | |
...) ]) |
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
// static var Query = Define.Object<Root>(...) | |
let Query = | |
Define.Object<Root> | |
(name = "Query", | |
fields = [ Define.AsyncField ( | |
name = "grupoj", | |
type = ListOf GrupoType, | |
resolver = asyncGetRecenzoj) ]) |
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
type Root (serviceProvider : IServiceProvider, | |
user : Lazy<Result<GraphQLUser, ErrorMessage>>, | |
facebookService : Lazy<Result<IFacebookService, ErrorMessage>>, | |
securityOptions : IOptions<SecurityOptions>) = | |
let securityOptions = securityOptions.Value | |
member val RequestId = System.Guid.NewGuid () with get |
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
type Reaction = enum Reaction | |
{ | |
| Undefined = 0 Undefined = 0, | |
| Cool = 1 Cool = 1, | |
| LoveIt = 2 LoveIt = 2, | |
| Boring = 3 Boring = 3, | |
| Gripping = 4 Gripping = 4, | |
| Sad = 5 Sad = 5, | |
| Inspiring = 6 Inspiring = 6 |
NewerOlder