Here is a possible implementation:
https://github.com/strawberrymusicplayer/strawberry/pull/906/files