any ETA on deleteAll? I have 150k entries that nee...
# prisma-whats-new
j
any ETA on deleteAll? I have 150k entries that need deleting heh
a
@joar Open the schema, cut the type, apply changes, past the type, apply changes, all gone 😄
j
Haha solid solution if it wasnt for the fact that i need to keep 25% of the data
a
well, then it's not deleteAll, is it? 🙂
n
@joar is there a filter condition that matches the items you need to delete?
j
Yep! @nilan
n
you could adjust this snippet: https://github.com/graphcool-examples/scripts/blob/master/delete-nodes/delete-nodes.js#L29-L37 and include the filter condition
j
I was planning that but at a rate of 3 delete requests / second it would take me 30 days to complete the operation
a
The script should be adapted for batch mutations
to send a set of delete mutations in one batch mutation to the server
j
oh that’s a good idea @agartha !
a
Bluebird.map already has concurrency built in
So I would get 200 id's, create 8 batch mutations with 25 delete requests in them, fire those concurrent using the bluebird.map call (max. concurrency 8)
That would get you the highest throughput