How to create or delete multiple values at a time in a batch?
See original GitHub issue** Which Category is your question related to? ** API
** What AWS Services are you utilizing? ** GraphQL, Dynamo DB, Codegen
** Provide additional details e.g. code snippets ** I have the following schema:
type Contact @model @auth(rules: [{ allow: owner }]) {
id: ID!
firstName: String!
lastName: String!
city: String
company: String
position: String
group: Group!
tendency: Tendency!
}
enum Group {
innerFive
friend
confidant
acquaintance
distantAcquaintance
}
enum Tendency {
rise
maintain
fall
}
This generated the following Graphql mutations for creating and deleting:
export const createContact = `mutation CreateContact($input: CreateContactInput!) {
createContact(input: $input) {
id
firstName
lastName
city
company
position
group
tendency
}
}
`;
export const deleteContact = `mutation DeleteContact($input: DeleteContactInput!) {
deleteContact(input: $input) {
id
firstName
lastName
city
company
position
group
tendency
}
}
`;
How can I delete or create in bulk? Let’s say I have an array of ID’s. What is the most efficient way to delete all users with those ID’s?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
5 Quick Methods to Batch Delete Multiple Rows or Columns in ...
Method 4: Run a Macro to Delete Multiple Non-consecutive Rows. First and foremost, select rows. Press “Alt+ F11” to open VBA editor in...
Read more >Batch file to delete multiple values within a key in Registry
Goal is to create a batch file to delete all the "Find *" values without knowing the maximum value beforehand. I tried the...
Read more >delete records from multiple objects via apex batch class
I want to do all of it in one batch class, possibly by iterating through each object, adding records for deletion to one...
Read more >Bulk-delete Data | CockroachDB Docs
Batch delete on a non-indexed column · Use a WHERE clause that filters on the column identifying the rows. · Add an AS...
Read more >Batch Actions - monday.com Support
Batch actions toolbar · Duplicate the items · Export these items to Excel · Archive the items with the option to restore them...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@LucasAndrad and anyone else who stumbles on this, @janhesters wrote up their findings in this blog https://medium.com/@jan.hesters/creating-graphql-batch-operations-for-aws-amplify-with-appsync-and-cognito-ecee6938e8ee
This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server
*-help
channels or Discussions for those types of questions.