Creating service with railway api doesn't deploy properly anymore
Hello, when we create a new service using the railway api the "services" gets created but no deploys are made and a vague error is returned from the api. This was working before, a few weeks ago. We've changed nothing. Is there something we are doing incorrectly?
Error:
Solution:Jump to solution
turn out the
serviceCreate
mutation with a source will kick off a deployment, i was thinking of a different usecase, so apologies there.
this works
```graphql
mutation serviceCreate($input: ServiceCreateInput!) {
serviceCreate(input: $input) {...16 Replies
Project ID:
001efb46-b92f-4a5f-935d-49a81a52755e
001efb46-b92f-4a5f-935d-49a81a52755e
create the service with
serviceCreate
but without a source, then call serviceConnect
with a source, this will then kick off a deployment.
and please use variables instead of hard coding them into the query itselfis there any way we can do this in one call?
not that i know of
It was working with one call before. Did you guys intentionally disable that?
i dont work for railway, so i couldnt say
but when did it stop working?
We just noticed today
well the entire team has been on vacation for a while now, so there is zero chance an api change was made
It seems like
serviceConnect
needs a Id to know what to deploy... Sadly since serviceCreate
is errorring its not returning any ids 😦
is it a different id maybe?first get
serviceCreate
to stop erroring, then you will gen an id returnedSolution
turn out the
serviceCreate
mutation with a source will kick off a deployment, i was thinking of a different usecase, so apologies there.
this works
like i said, please use variables, never hard code them into the query/mutationgotcha thanks for clarifying... I've updated the code to use variables and its having the same error :/
show the code please, i have confirmed that muation works just fine on my end
oh wait I had a extra {
That fixed it. Thanks!
no problem!