If it was a simple APIView - You can pass extra context dictionary to your serializer and then you can override the __init__ and/or to_representation of your serializer and access the passed context there.
for exa.
in your view:
serializer = MySerializer(queryset, context = {'user':request.user })
Your serializer:
class MySerializer(serializers.ModelSerializer):
def __init__(self, *args, **kwargs):
user = kwargs.get('context').get('user', None)
if user:
self.user = user
super(MySerializer, self).__init__(*args, **kwargs)
def to_representation(self, instance):
data = super().to_representation(instance)
if(hasattr(self, "user")):
data['user'] = self.user
return data