Use Ecto Repo.preload with an Ash resource

I know that it is possible to use plain ecto queries to query an Ash resource.

But is it also possible to use Repo.preload function? When I try to use it it fails because, of course, it doesn’t recognizes the Ash.NotLoaded module.

I’m not sure. There are some helper functions in the repo for turning records to/from ash/ecto IIRC, you could fetch your records and use that. Kind of a bummer if not, but it makes sense. You can probably use an option to preload to prevent it from ignoring fields that are already loaded.