2 years ago
is there an eazy way to do this? I want to be able to clear up the database easily and also disable backups
43 Replies
2 years ago
wipe the volume from within the volume setting, additionally railway does not take any backups for you in any way
2 years ago
can volume be wiped programmatically or through cli?
2 years ago
you can wipe it from the API yeah
2 years ago
with cli no?
2 years ago
the CLI doesn't offer that functionality afaik
2 years ago
oof. I'm US based

2 years ago
only auth'd no playground?
2 years ago
that's okay because that's not how the API works
2 years ago
well most graphql apis take you to a playground if it's a GET request
2 years ago
instead of blocking you
2 years ago
can you tell me your usecase please?
2 years ago
graphiql
2 years ago
example https://graphql.github.com/ redirects you to a playground if it's GET
2 years ago
can you tell me your usecase?
2 years ago
2 years ago
i want to explore the schema so I can construct the necessary query in order to wipe volume
2 years ago
nice thanks
2 years ago
i meant your usecase for wiping the volume
2 years ago
oh sorry
2 years ago
I'm creating railway deployment guide then a template for this https://github.com/joshstevens19/rindexer
while developing that I find myself deploying frequently and needing a fresh database. Basically to make sure indexing and db sync is working
2 years ago
I would not need that in production
2 years ago
if its just for development, why not just click wipe volume in the volume settings?
2 years ago
i deploy a lot within my shell
2 years ago
rarely use the dashboard
2 years ago
gotcha
2 years ago
mutation volumeInstanceWipe($volumeInstanceId: String!) {
volumeInstanceWipe(volumeInstanceId: $volumeInstanceId)
}{
"volumeInstanceId": "id_here"
}2 years ago
thanks
2 years ago
can't find volume id
2 years ago
open the volume and the id is in the url
2 years ago
it worked and also

2 years ago
yes, there is no wipe option
2 years ago
so this just removes the volume entirely?
2 years ago
yep
2 years ago
silly question, now that I wiped the volume it removed the deployment. Understandable. What do to create a new deployment?

2 years ago
it should not remove the deployment, I just tried it and it redeployed
2 years ago
but simply redeploy it
2 years ago
argh I ran volumeDelete(volumeId: $volumeId) instead of volumeInstanceWipe
2 years ago
but I don't see a volumeInstanceWipe in the schema
2 years ago

2 years ago
it doesnt need to be, use the internal endpoint
2 years ago
that deleted the volume entirely instead of just clearing data
2 years ago
yes, as you mentioned you called the wrong mutation
2 years ago
i couldn't do this without you