Mutation `@update` for multiple records
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- PHP
- Stars
- 3.5k
- Forks
- 468
- Avg merge
- 3h 9m
- Merged PRs (30d)
- 2
Description
What problem does this feature proposal attempt to solve?
Update multiple records
schema.graphql:
updateCheckList(ID: [ID!], status: Int): [checkList] @update
from client:
mutation{
updateCheckList(ID: [44,266,36,46], status: 1){
ITEM
CHECKED
}
}
I've try it but throws the error:
Argument 2 passed to Nuwave\\Lighthouse\\Execution\\Arguments\\ArgPartitioner::relationMethods()
must be an instance of Illuminate\\Database\\Eloquent\\Model, instance of Illuminate\\Database\\Eloquent\\Collection given
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the mutation example in the issue and the reported ArgPartitioner::relationMethods() error, especially its handling of an Eloquent Collection. Trace the @update mutation path to identify where multiple records are partitioned. Done means the listed IDs can be updated through one mutation without the reported type error, with coverage for the multiple-record case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, laravel, php
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100