Skip to content

Instantly share code, notes, and snippets.

@smoak
Created March 1, 2018 00:36
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 smoak/71edc31bc7296cc811c9fe5d8f4447a6 to your computer and use it in GitHub Desktop.
Save smoak/71edc31bc7296cc811c9fe5d8f4447a6 to your computer and use it in GitHub Desktop.
defmodule Schema do
use Absinthe.Schema
object :user do
field :id, non_null(:id)
end
object :viewer do
field :user, non_null(:user) do
resolve(fn _parent, _args, _ctx ->
IO.puts("resolving user")
{:ok, nil}
end)
end
end
query do
field :viewer, :viewer
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment