field :artist, :artist field :album, :album field :producer, :integer field :duration, :integer end object :artist do field :id, :id field :name, :string field :albums, list_of(:album) field :tracks, list_of(:tracks) end
:tracks, Track timestamps end schema "albums" do field :title, :string field :release_date, Ecto.Date belongs_to :artist, Artist many_to_many :genres, Genre, join_through: "albums_genres" has_many :tracks, Track timestamps end
:tracks, Track timestamps end schema "albums" do field :title, :string field :release_date, Ecto.Date belongs_to :artist, Artist many_to_many :genres, Genre, join_through: "albums_genres" has_many :tracks, Track timestamps end
de dados diferentes para múltiplos clientes. • PREPARAR DADOS: Há muito esforço do server preparar os dados e do cliente para parsea-los. • LINKAR DADOS: Quando os dados mudam com muita frequência e precisam estar linkados sempre.