Skip to content

Instantly share code, notes, and snippets.

@xperiandri
Last active December 5, 2020 07:59
Show Gist options
  • Save xperiandri/ae6df7d76582871bd175a402b3676a39 to your computer and use it in GitHub Desktop.
Save xperiandri/ae6df7d76582871bd175a402b3676a39 to your computer and use it in GitHub Desktop.
// static var Query = Define.Object<Root>(...)
let Query =
Define.Object<Root>
(name = "Query",
fields = [ Define.AsyncField (
name = "grupoj",
type = ListOf GrupoType,
resolver = asyncGetRecenzoj) ])
// static var Mutation = Define.Object<Root>(...)
let Mutation =
Define.Object<Root>
(name = "Mutation",
fields = [ Define.AsyncField (
name = "setComment",
type = RecenzoType,
description = "Set comment into review",
inputs = [ Define.Input ("command", SetCommentInputType) ],
resolver = asyncSetComment) ])
let schema: ISchema<Root> = upcast Schema(Query, Mutation, config = schemaConfig)
// static ISchema<Root> schema = new Schema(Query, Mutation, config: schemaConfig);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment