a year ago
I'm trying to create a form on my website that deploys a github repository to railway with specified environment variables. I was wondering what the input fields for the githubRepoDeploy mutation were. I'm relatively new to graphql, and I couldn't find any explanation to the shape of the GitHubRepoDeployInput type. Any help is appreciated. Just trying to figure out what I can pass as input to this mutation.
mutation githubRepoDeploy($input: GitHubRepoDeployInput!) {
githubRepoDeploy(input: $input)
}In postman, the GraphQL Variables section looks like this:
{
"input": null
}if you can please ping me
14 Replies
a year ago
hello, may I ask what's the usecase?
I want to deploy whitelabel versions of my discord bot. Similar to what https://ticketsbot.net does for their whitelabel bots if you've seen them
So customers can specify embed colors, footer information, thumbnails, and a discord bot token and then when they submit the form on my dashboard, Im trying to make it deploy my github repo with specific environment variables to have their customization on a custom bot
a year ago
how are you planning to manage your deploys of the bot? eventually you may get to a point where its no longer feasible to manage them through the dashboard
I was planning on storing bot information in my database, along with the projectId for railway and the most recent deploymentId. That way when customers resubmit the form, I can update the railway service's environment variables and redeploy it, and provide them with the status of the deployment (in case it fails).
Currently im not expecting more than 10 bots. As im being very peculiar as to who i approve for whitelabel bots
i dont know if this is the right way to do it either, i was just using railway and thought of doing it this way
a year ago
gotcha, but I would strongly suggest investing your time doing something better than rolling your own terraform, code your bot in a multi-tenant way instead
My bot works in multiple guilds, the idea was for customers who pay extra, they can use their own token and get their own bot deployed with my functionality.
So instaed of the bot being Crspy's Bot, it would be Brody's bot in your server
a year ago
have a generic name and then white label it beyond that
a year ago
figuring out how to deploy a new bot for every user let alone manage them is not an effective use of your time