New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Ability to Bulk Delete Based on Results of a Query #903

Closed
willcj33 opened this Issue May 5, 2017 · 5 comments

Comments

Projects
None yet
6 participants
@willcj33
Copy link

willcj33 commented May 5, 2017

I think it would be useful to have the ability to run a query like so:
{deleteItems as var(func: eq(property, someval)){} delete(id: var(deleteItems)) }
That may be poor syntax, but just having the ability to query and delete based on that query would be great.

@manishrjain

This comment has been minimized.

Copy link
Member

manishrjain commented May 10, 2017

This depends upon #919.

@manishrjain manishrjain added this to the v0.8 milestone May 10, 2017

@manishrjain manishrjain added the feature label May 10, 2017

@ashwin95r ashwin95r assigned ashwin95r and unassigned szymonm Jul 3, 2017

@manishrjain manishrjain added the ready label Jul 5, 2017

@manishrjain

This comment has been minimized.

Copy link
Member

manishrjain commented Jul 5, 2017

@ashwin95r Can you confirm that this would work now? Test it out before marking this issue as resolved.

@ashwin95r

This comment has been minimized.

Copy link
Contributor

ashwin95r commented Jul 6, 2017

Yes, It doesn't work now. I'm looking into it.

@ashwin95r ashwin95r closed this in 4ddf551 Jul 6, 2017

@manishrjain manishrjain removed the ready label Jul 6, 2017

@zboralski

This comment has been minimized.

Copy link

zboralski commented Mar 13, 2018

is it possible to make a query ... for example get all nodes with predicate x, filter nodes that don't have predicate y... delete all resulting nodes?

@pawanrawal

This comment has been minimized.

Copy link
Contributor

pawanrawal commented Mar 13, 2018

This is possible in a two-step process.

  1. Make a query as part of a transaction to get the uids of all filtered nodes.
  2. Issue another mutation as part of the same transaction to delete them.

@manishrjain manishrjain added the feature label Mar 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment