-
Notifications
You must be signed in to change notification settings - Fork 766
Open
Labels
Description
I'm trying to perform partial update using graphene. I'm following docs for serializers, but I can't run the mutation, because of required fields. Here's an example.
Serializer
class StudySerializer(serializers.ModelSerializer):
class Meta:
model = Study
fields = '__all__'
# required for accepting "id" in mutation's arguments
# see https://github.com/graphql-python/graphene-django/issues/906#issuecomment-602078174
extra_kwargs = {'id': {'read_only': False, 'required': False}}Mutation
class UpdateStudy(SerializerMutation):
class Meta:
serializer_class = StudySerializer
model_operations = ['update']GraphQL is complaining about missing fields in mutation, but they should be optional
Is there any workaround for this?
OlafHaalstra, bigtimecriminal, briggySmalls, Shivin01, AGKhalil and 1 more
