August 2025
Intermediate to advanced
294 pages
6h 59m
English
We can’t forget about our API users; they’d like to be able to see track information for albums, too! To support the Track resource in the APIs, use the ash.extend Mix task to add the extensions and the basic configuration:
| | $ mix ash.extend Tunez.Music.Track json_api |
| | $ mix ash.extend Tunez.Music.Track graphql |
Because we will always be reading or updating tracks in the context of an album, we don’t need to add any JSON API endpoints or GraphQL queries or mutations for them: the existing album endpoints will be good enough. But we do need to mark relationships and attributes as public?: true if we want them to be readable. This includes the tracks relationship in the Tunez.Music.Album ...
Read now
Unlock full access