Skip to content

Commit

Permalink
Updates in song model.
Browse files Browse the repository at this point in the history
Was getting this error while adding the lyrics. Issue and patch mentioned here Automattic/mongoose#5574 (comment)

```bundle.js:6882 Uncaught (in promise) Error: GraphQL error: Unknown modifier: $pushAll
    at new ApolloError (bundle.js:6885)
    at bundle.js:15869```
  • Loading branch information
theparadoxer02 committed Sep 20, 2018
1 parent ae26155 commit 9f7d215
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/models/song.js
Expand Up @@ -11,7 +11,7 @@ const SongSchema = new Schema({
type: Schema.Types.ObjectId,
ref: 'lyric'
}]
});
}, { usePushEach: true });

SongSchema.statics.addLyric = function(id, content) {
const Lyric = mongoose.model('lyric');
Expand Down

0 comments on commit 9f7d215

Please sign in to comment.