Skip to content

sevenseacat/ash_through_relationship_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ash through relationship example

An example showing how to create a through relationship, demonstrated with countries, regions, cities, and landmarks.

I wrote more about this in a blog post, Modelling through relationships with Ash

Setup

$ git clone git@github.com:sevenseacat/ash_through_relationship_example.git
$ cd ash_through_relationship_example
$ mix deps.get

Run

$ mix ash.setup
$ mix run priv/repo/seeds/*.exs

Then you can test queries in iex, eg:

iex(1) Ash.get!(Example.World.Country, %{name: "Australia"}, load: [:city_count])

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages