Skip to content

Instantly share code, notes, and snippets.

@pmk1c
Last active June 12, 2017 11:09
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/c88f028e021e0f81db8ab35bf3aa9b39 to your computer and use it in GitHub Desktop.
Save pmk1c/c88f028e021e0f81db8ab35bf3aa9b39 to your computer and use it in GitHub Desktop.
RestQL - GraphQL Types
defmodule Restql.Blog.Schema.Types do
use Absinthe.Schema.Notation
object :post do
field :id, :id
field :title, :string
field :body, :string
field :author, :user
end
object :user do
field :id, :id
field :name, :string
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment