question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
PeteDuncansoncommented, Nov 16, 2020
0reactions
github-actions[bot]commented, Nov 17, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found