try this instead:
use mix ash.gen.base_resource MyApp.Resource and then modify it to look something like this:
# use it in the resources like this
use MyApp.Resource
defmodule MyApp.Resource do
defmacro __using__(opts) do
data_layer =
if App.Config.use_sqlite?() do
AshSqlite.DataLayer
else
AshPostgres.DataLayer
end
opts = Keyword.put_new(opts, :data_layer, data_layer)
quote do
use Ash.Resource, unquote(opts)
end
end
end






















