This is a really simple example but I have no idea why it’s not working, I triple checked that I have everything setup as described in the docs.
I am trying to import fields, here’s my root schema
defmodule AuctionBackendGraphql.Schema do
use Absinthe.Schema
import_types(__MODULE__.ItemTypes)
query do
import_fields(:item_queries)
end
end
And I am trying to import queries from here
defmodule AuctionBackendGraphql.Schema.ItemQueries do
use Absinthe.Schema.Notation
alias AuctionBackendGraphql.Resolver
object :item_queries do
field :list_items, &Resolver.Item.list_items/3
end
end
And I am getting an error as such
In Rootquerytype, :item_queries is not defined in your schema.
Types must exist if referenced.
This is my project structure
New to absinthe and phoenix as a whole, so this is probably something really stupid