Change target branch with GraphQL api
galus-klemens
PROOP

4 months ago

Hi :D
I would like to change the target branch (github) on my service "x" from dev to -> feature/XXXX
but im not finding it in the API doc
Any advice ?

$10 Bounty

11 Replies

https://railway.com/graphiql
You can find all of the available GraphQL queries there


galus-klemens
PROOP

4 months ago

Oh thx !
But i was struggeling about witch API mutation use :D


galus-klemens
PROOP

4 months ago

ServiceInstanceUpdateInput
But there is nothing about the branch (only repo)


galus-klemens
PROOP

4 months ago

Maybe deploymentTrigger


galus-klemens
PROOP

4 months ago

after few test it's still now working :/


try this query

mutation Branch($serviceId:String!, $branch:String!, $repo:String!){
  serviceConnect(
    id:$serviceId
    input: {
      branch: $branch
      repo: $repo
    }
  ) {
    id
    name
  }
}

It's probably going to return some kind of ServiceInstance not found error but that's probably related to the id name being queried from serviceConnect but the branch should update properly with this mutation query


4 months ago

Hey did you ever see the message I had sent in slack? 😁
I left the detailed steps which should do this


4 months ago

Hey @Nems - Just curious as to why you are using Discord when you have a Slack channel with us. Discord threads come with zero response time guarantees and are largely community only.


galus-klemens
PROOP

4 months ago

Hey @Brody and @Error 😇
Yep just saw your messages on slack :p
I was wondering if the discord community is big enough to help me with "basic" things and compensate for the time difference between us


4 months ago

For sure! we just ask that you don't create duplicate threads in slack and then Discord, or vice versa.


Loading...