graphql-python / graphql-python/graphene-django

DjangoModelFormMutation ignores input_field_name option

Open
#1,037 2 comments 0 reactions 0 assignees View on GitHub
🐛bug
Dominant language
Python
Stars
4.4k
Forks
760
PR merge metrics
No merged PRs in 30d

Description

* **What is the current behavior?**

`DjangoModelFormMutation` has the option to change the input name of the mutation, but it is always set to "input" regardless of value. Like so:

```
class SendMessageMutation(DjangoModelFormMutation):
message = relay.Node.Field(MessageType)

class Meta:
form_class = SendMessageForm
input_field_name = "message"
```

* **What is the expected behavior?**
Documentation states you can set `input_field_name` in the meta:
https://docs.graphene-python.org/projects/django/en/latest/mutations/

* **Please tell us about your environment:**

- Version: graphene-django: 2.13.0, graphene 2.1.8
- Platform: Django 3.0.11

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.