DjangoCreateMutation
Will create a new mutation which will create a new object of the supplied model.
Mutation input arguments:
Argument |
Type |
|---|---|
input |
Object! |
Meta fields:
Field |
Type |
Default |
Description |
|---|---|---|---|
|
Model |
|
The model. Required. |
|
Iterable |
|
If supplied, only these fields will be added as input variables for the model. |
|
Iterable |
|
If supplied, these fields will be excluded as input variables for the model. |
|
String |
|
The name of the return field within the mutation. The default is the camelCased name of the model. |
|
Tuple |
|
The permissions required to access the mutation. |
|
Boolean |
|
If true, the calling user has to be authenticated. |
|
Dict |
|
A mapping of context values into model fields. See below. |
|
Tuple |
|
A list of fields which explicitly should have |
|
Tuple |
|
A list of fields which explicitly should have |
|
Tuple |
|
A list of custom graphene fields which will be added to the model input type. |
|
String |
|
If supplied, the input variable in the mutation will have its typename set to this string. This is useful when creating multiple mutations of the same type for a single model. |
|
Dict |
|
A dict with extra information regarding many-to-many fields. See below. |
|
Dict |
|
A dict with extra information regarding many-to-one relations. See below. |
|
Dict |
|
A dict with extra information regarding foreign key extras. |
|
Dict |
|
A dict with extra information regarding one-to-one extras. |
mutation {
createUser(input: {name: "John Doe", address: "Downing Street 10"}){
user{
id
name
address
}
}
}