Skip to content

SerializerMutation nested serializer with many=True #458

Closed
@sks-keo

Description

@sks-keo

I have a DRF Serializer with a field using a custom nested serializer, something like this:

class FirstSerializer(serializers.ModelSerializer):
    class Meta:
        model = FirstModel
        fields = "all"

class SecondSerializer(serializers.ModelSerializer):
    class Meta:
        model = SecondModel
        fields = ('field_a', 'field_b')
    field_b = FirstSerializer(many=True)

I'm trying to create a mutation on the FirstSerializer like this:

class MyMutation(SerializerMutation):
    class Meta:
        serializer_class = SecondSerializer

djangorestframework==3.8.2

graphene>=2.1.2
graphene-django==2.1rc1
graphql-core>=2.1rc1

screen shot 2018-06-21 at 10 36 15 am

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions