Example #1
0
    def mutate(self, info, input):
        data = input_to_dictionary(input)

        genre = ModelGenre(**data)
        music_session.add(genre)
        music_session.commit()

        return CreateGenre(genre=genre)
Example #2
0
    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)

        cover = ModelCover(**data)
        music_session.add(cover)
        music_session.commit()

        return CreateCover(cover=cover)
Example #4
0
    def mutate(self, info, input):
        data = input_to_dictionary(input)

        resource = ModelResource(**data)
        music_session.add(resource)
        music_session.commit()

        return CreateResource(resource=resource)
Example #5
0
    def mutate(self, info, input):
        data = input_to_dictionary(input)

        artist = ModelArtist(**data)
        music_session.add(artist)
        music_session.commit()

        return CreateArtist(artist=artist)
Example #6
0
    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)

        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)
Example #8
0
    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)
Example #9
0
    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)
Example #10
0
    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)