Created
December 4, 2020 10:47
-
-
Save xperiandri/c7b7c9e935eafe1342fbbfc45523caa6 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
// static var Mutation = Define.Object<Root>(...) | |
let Mutation = | |
Define.Object<Root> ( | |
... | |
fields = [ Define.AsyncField ( | |
... | |
inputs = [ Define.Input ("command", SetCommentInputType) ], | |
...) ]) | |
[<Struct>] | |
type SetCommentInput = | |
{ BookId : BookId // Guid | |
Comment : Comment } | |
// static var SetCommentCommandInputType = Define.InputObject<SetCommentInput>(...) | |
let SetCommentCommandInputType = | |
Define.InputObject<SetCommentInput> | |
(name = "SetCommentCommand", | |
description = "Fields to add or update comment to a book", | |
fields = [ | |
Define.Input("bookId" , ID , description = "Book Id"), | |
Define.Input("comment", CommentTextType, description = "Comment to the book definition") ]) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment