def mutate(self, info, input): data = input_to_dictionary(input) genre = ModelGenre(**data) music_session.add(genre) music_session.commit() return CreateGenre(genre=genre)
def mutate(self, info, input): data = input_to_dictionary(input) album = ModelAlbum(**data) music_session.add(album) music_session.commit() return CreateAlbum(album=album)
def mutate(self, info, input): data = input_to_dictionary(input) user = ModelUser(**data) main_session.add(user) main_session.commit() return CreateUser(user=user)
def mutate(self, info, input): data = input_to_dictionary(input) permission = Permission(**data) main_session.add(permission) main_session.commit() return CreatePermission(permission=permission)
def mutate(self, info, input): data = input_to_dictionary(input) cover = ModelCover(**data) music_session.add(cover) music_session.commit() return CreateCover(cover=cover)
def mutate(self, info, input): data = input_to_dictionary(input) setting = ModelSetting(**data) main_session.add(setting) main_session.commit() return CreateSetting(setting=setting)
def mutate(self, info, input): data = input_to_dictionary(input) resource = ModelResource(**data) music_session.add(resource) music_session.commit() return CreateResource(resource=resource)
def mutate(self, info, input): data = input_to_dictionary(input) artist = ModelArtist(**data) music_session.add(artist) music_session.commit() return CreateArtist(artist=artist)
def mutate(self, info, input): data = input_to_dictionary(input) album = music_session.query(ModelAlbum).filter_by(id=data["id"]) album.update(data) music_session.commit() user = music_session.query(ModelAlbum).filter_by(id=data["id"]).first() return UpdateAlbum(album=album)
def mutate(self, info, input): data = input_to_dictionary(input) user = main_session.query(ModelUser).filter_by(id=data["id"]) user.update(data) main_session.commit() user = main_session.query(ModelUser).filter_by(id=data["id"]).first() return UpdateUser(user=user)
def mutate(self, info, input): data = input_to_dictionary(input) permission = main_session.query(ModelPermission).filter_by(id=data["id"]) permission.update(data) main_session.commit() permission = main_session.query(ModelPermission).filter_by(id=data["id"]).first() return UpdatePermission(permission=permission)
def mutate(self, info, input): data = input_to_dictionary(input) cover = music_session.query(ModelCover).filter_by(id=data["id"]) cover.update(data) music_session.commit() user = music_session.query(ModelCover).filter_by(id=data["id"]).first() return UpdateCover(cover=cover)
def mutate(self, info, input): data = input_to_dictionary(input) setting = main_session.query(ModelSetting).filter_by(id=data["id"]) setting.update(data) main_session.commit() setting = main_session.query(ModelSetting).filter_by(id=data["id"]).first() return UpdateSetting(setting=setting)
def mutate(self, info, input): data = input_to_dictionary(input) genre = music_session.query(ModelGenre).filter_by(id=data["id"]) genre.update(data) music_session.commit() user = music_session.query(ModelGenre).filter_by(id=data["id"]).first() return UpdateGenre(genre=genre)
def mutate(self, info, input): data = input_to_dictionary(input) resource = music_session.query(ModelResource).filter_by(id=data["id"]) resource.update(data) music_session.commit() user = music_session.query(ModelResource).filter_by( id=data["id"]).first() return UpdateResource(resource=resource)
def mutate(self, info, input): data = input_to_dictionary(input) artist = music_session.query(ModelArtist).filter_by(id=data["id"]) artist.update(data) music_session.commit() user = music_session.query(ModelArtist).filter_by( id=data["id"]).first() return UpdateArtist(artist=artist)