AE
Ash Elixir•2y ago
Jason

Resource MyApp.Accounts.FriendLink is not present in any known Ash.Api module.

I'm getting the above warning even though this module is indeed listed in the registry. What am I missing?
defmodule MyApp.Accounts.Registry do
use Ash.Registry,
extensions: Ash.Registry.ResourceValidations

entries do
entry MyApp.Accounts.User
entry MyApp.Accounts.FriendLink
defmodule MyApp.Accounts.Registry do
use Ash.Registry,
extensions: Ash.Registry.ResourceValidations

entries do
entry MyApp.Accounts.User
entry MyApp.Accounts.FriendLink
config :myapp, ash_apis: [MyApp.Accounts, ]
config :myapp, ash_apis: [MyApp.Accounts, ]
4 Replies
ZachDaniel
ZachDaniel•2y ago
🤔 And in MyApp.Accounts the registry is hooked up? i.e
resources do
registry Registry
end
resources do
registry Registry
end
FWIW we don't actually need registries anymore You can do
resources do
resource Resource
resource OtherResource
end
resources do
resource Resource
resource OtherResource
end
in the api directly
Jason
JasonOP•2y ago
Yes, registry Registry is there. Trying resource FriendLink now.
ZachDaniel
ZachDaniel•2y ago
also, are you getting the warning on compile or from ElixirLS? sometimes it takes a while to catch up
Jason
JasonOP•2y ago
on compile Oddly enough, I'm not getting that warning anymore. I didn't even change anything 🙂

Did you find this page helpful?