Skip to content

Instantly share code, notes, and snippets.

@xperiandri
Created December 4, 2020 10:47
Show Gist options
  • Save xperiandri/c7b7c9e935eafe1342fbbfc45523caa6 to your computer and use it in GitHub Desktop.
Save xperiandri/c7b7c9e935eafe1342fbbfc45523caa6 to your computer and use it in GitHub Desktop.
// 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