Skip to content

Instantly share code, notes, and snippets.

@pmk1c
Created June 12, 2017 12:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmk1c/4656f6e7f33dc5342e82c875cc564640 to your computer and use it in GitHub Desktop.
Save pmk1c/4656f6e7f33dc5342e82c875cc564640 to your computer and use it in GitHub Desktop.
RestQL - CreatePost manipulation in GraphQL Schema
defmodule Restql.Blog.Schema do
# ...
mutation name: "CreatePost" do
field :post, type: :post do
arg :title, non_null(:string)
arg :body, non_null(:string)
resolve &Restql.Blog.PostResolver.create/2
end
end
# ...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment