graphql-python / graphql-python/graphene
Is it possible to pass an array of inputs to a relay.clientIDMutation?
- Dominant language
- Python
- Stars
- 8.2k
- Forks
- 818
- PR merge metrics
- No merged PRs in 30d
Description
I want to update a django model that has a one to many relation with the model that has the mutation. I know this is possible with queries and also with `graphene.Mutation` mutations using `class Arguments`.
i am currently using `graphene.relay.ClientIDMutation` and I would like to know if its possible to have a dynamic sized class of inputs as an argument for the mutation.
here is a representation of inputs(array) I want to work with,
```
mutation{
addGamePrequels(input:{
gameThatNeedsPrequels: "game2"
gamearray:[
{
name:"test1",
price:"1",
datereleased:"2020-07-17",
},
{
name:"test2",
price:"1",
datereleased:"2020-07-17",
},
{
name:"test3",
price:"1",
datereleased:"2020-07-17",
},
]
}
){
game{
name
collection{
collectionname
}
}
}
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with graphene.relay.ClientIDMutation and the dynamic gamearray input shape shown in the issue. Check how ClientIDMutation defines and accepts inputs, then compare that behavior with graphene.Mutation using class Arguments. The work is done when the supported approach or limitation is documented clearly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, python
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100