Listing graphs and variants

Our CI/CD process has created a bunch of variants of our graphs that are no longer needed.

Is there any way we can list graphs and their variants so that they can be parsed out and then use rover to delete them?

Hi! So sorry for the delay. I think what I would suggest here is using our new public platform API to list your variants and delete them. I don’t think Rover has a rover list graphs command yet that you can use for something like that, but you could use the API to get that data and parse through it in a little script.

Here’s an example query:

Thanks for the reply, but we’ve decided to go a different route. What we were doing was publishing the graphs for temporary environments used for testing and not cleaning them up. That caused the main graph page in Studio for our org to be unresponsive and nearly useless for a couple minutes while it made all the graph variant queries. We’ve decided to not publish the variants in these temporary environments instead of adding another task to our CI/CD pipeline to clean up the variant when the temp env is deleted. I might use your example to cleanup the junk that’s been left behind as a one-time cleanup, though.

Thanks again.