Skip to content

Instantly share code, notes, and snippets.

Created August 3, 2017 06:44
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save anonymous/86767f43a02a1fe15fbf75979fa974a5 to your computer and use it in GitHub Desktop.
the description for this gist
val IdArg = Argument("id", IntType)
val NameArg = Argument("name", StringType)
val Mutation = ObjectType("Mutation", fields[ShopRepository, Unit](
Field("addCategory", CategoryType,
arguments = IdArg :: NameArg :: Nil,
resolve = c => c.ctx.addCategory(c.arg(IdArg), c.arg(NameArg))
)
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment