示例#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)
示例#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)
示例#3
0
    def mutate(self, info, input):
        data = input_to_dictionary(input)

        user = ModelUser(**data)
        main_session.add(user)
        main_session.commit()

        return CreateUser(user=user)
示例#4
0
    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)
示例#6
0
    def mutate(self, info, input):
        data = input_to_dictionary(input)

        setting = ModelSetting(**data)
        main_session.add(setting)
        main_session.commit()

        return CreateSetting(setting=setting)
示例#7
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)
示例#8
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)
示例#9
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)
示例#10
0
    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)
示例#11
0
    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)
示例#12
0
    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)
示例#13
0
    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)
示例#14
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)
示例#15
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)
示例#16
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)