Link data

Linking data between music module and art module by adding cover artwork for albums

Modify music module to have album cover artwork

Update music.model.ts file inside the libs/codegen/music/srcdirectory

@Entity('album')
export class Album {
  ....
  @Prop({
    examples: ['9c754c102e022513cb8dfb5c645a648b2369b4678236032b1370bd2176379853']
  })
  coverArtworkId: string;
  ...
}

Update music module API

Build module, so the changes in the model come to effect

pnx affected:build

Update API

pnx g @logosphere/sdk:api --module music

Build and test the changes

Create new docker image for music module and update running container

Update music album with cover artwork id

Mutation:

Variables:

Output:

Last updated