Clear Graph Data from Shell

I have multiple Graph in my Graph Studio

I just want to clear the ClientB_Graph data , If we do from Graph studio then i am sure this will delete other Graphs Data as well, this is too risky,
How can I delete for data for only one specific Graph from GSQL Shell
Please let me Know

@pkr2 - I believe CLEAR GRAPH STORE only works at the database level, so would clear all 3 graphs. If you just want to clear graph B, wouldn’t the sequence:
- USE GRAPH ClientB_Graph
- Re-CREATE GRAPH ClientB_Graph

do what you are looking for? The DROP would delete the schema, but it is then immediatley re-created.

@Robert_Hardaway thanks for your reply
i just want to clear the Client_B Graph “data” not the whole schema of Client_B Graph

I think you can recommend me some GSQL code to clear all the vertices and edges , so that i can run from Write Queries section, I don’t want to take risk of DROP ALL command

Hi pkr2,

This is the delete all query that I put on pretty much any graph that I’m prototyping on:

all = {ANY};

results = SELECT a FROM all:a - (:e) - ANY

You technically don’t need to delete the edges (the ACCUM block) as they will be removed if their source or destination vertices are removed.

1 Like