Schema
Schema
web/schema.ex
defmodule Blog.Schema do
use Absinthe.Schema
import_types Blog.Schema.Types
query do
@desc "Get a list of blog posts"
field :posts, list_of(:post) do
resolve &Blog.PostResolver.all/2
end
end
end
This schema will account for { posts { ··· } }
. It returns a Type of :post
, and delegates to a Resolver.