R
Railwayβ€’9mo ago
Monnicore

Deploying Postgres from GraphQL

Hello ! πŸ‘‹
I'm having a heck of a time trying to deploy a postgresql database through the GraphQL endpoint, but I'm able to create the project and post what always ends up being a blank template to said project. I'm looking to deploy both a postgresql database and one of my private github repos. Deploying A Project
mutation createProject {
projectCreate(input: {name: "that new new"}) {
name
id
}
}
mutation createProject {
projectCreate(input: {name: "that new new"}) {
name
id
}
}
Deploying PostgreSQL
mutation deployDatabase {
templateDeploy(
input: {
services: {
serviceName: "postgresql",
template: "postgresql"
},
projectId: "<CODE>",
templateCode: "postgresql"}) {
projectId
}
}
mutation deployDatabase {
templateDeploy(
input: {
services: {
serviceName: "postgresql",
template: "postgresql"
},
projectId: "<CODE>",
templateCode: "postgresql"}) {
projectId
}
}
Question - Is what I'm doing possible through the API, and can someone help point me in the right direction? Thanks in advance!
16 Replies
Percy
Percyβ€’9mo ago
Project ID: N/A
Monnicore
MonnicoreOPβ€’9mo ago
N/A
Monnicore
MonnicoreOPβ€’9mo ago
It seems to not deploy the required environment variables, I might just be missing something from the query that sets these up
No description
Brody
Brodyβ€’9mo ago
there is one dead simple way to figure out how to do this - open your dev tools and watch the networking calls as you replicate what you want to achive through the dashboard
Monnicore
MonnicoreOPβ€’9mo ago
That sounds perfect , thanks Brody !
Brody
Brodyβ€’9mo ago
but im curious now, i'd love to hear your use-case for this!
Monnicore
MonnicoreOPβ€’9mo ago
Working on a CMS that I want to run on Railway haha
Brody
Brodyβ€’9mo ago
and that will allow the user to deploy databases on the fly?
Monnicore
MonnicoreOPβ€’9mo ago
Yea, so basically a service that'll help agencies keep up with the times redacted
Brody
Brodyβ€’9mo ago
i should probably tell you that theres a 10 volume limit on the hobby plan, meaning you are limited to 10 databases per project, assuming databases are the only services with volumes in this senario
Monnicore
MonnicoreOPβ€’9mo ago
Yea, database will be the only volume needed. Will need to bump to Pro/Enterprise when I have a MVP likely Does Pro have that same limit?
Brody
Brodyβ€’9mo ago
i dont know the volume limit per project on pro, its more than 10 though and if you go beyond the pro plan you can get your limits bumped to anything you'd need
Monnicore
MonnicoreOPβ€’9mo ago
Ah, sick. Good to have that option
Brody
Brodyβ€’9mo ago
yep! railway can scale with you!
Monnicore
MonnicoreOPβ€’9mo ago
Nowhere else I'd rather build this my friend!
Brody
Brodyβ€’9mo ago
happy to hear that πŸ™‚
Want results from more Discord servers?
Add your server