Skip to content
tons of small questions (graphql, ...)
jcode
OP

2 years ago

I want to retrieve buildLogs with GraphQL but I need a deployment id.

Where can I find that?

Closed

21 Replies

jcode
OP

2 years ago

tons of small questions (graphql, ...)


jcode
OP

2 years ago

N/A


2 years ago

If you go to your service, then click on the latest active deployment, next to the service name you'll see the id to copy

1369980326683869324


2 years ago

you just click on that and it copies the deployment id


2 years ago

although, for your use-case this won't work long-term


2 years ago

this is because your deployment ID might change as you make updates

so you might want to use GraphQL to find your service, and from there find the latest active deployment, and then find the id through that


jcode
OP

2 years ago

Thanks that works.

How do I authorize for graphq ?

1369981035651137536


2 years ago

{"Authorization": "Bearer "} in headers

you can get a token from your railway account settings


jcode
OP

2 years ago

yeah no i'l fetch the latest deployment id and use that


jcode
OP

2 years ago

Yeah but like, how do I do it in the Railway GraphQL Playground?


2 years ago

click on headers, then put the header above in there


jcode
OP

2 years ago

Oh lol didn't see that, my bad


2 years ago

no worries


jcode
OP

2 years ago

GraphQL API is only accessible via backend?


2 years ago

It's accessible anywhere, though I wouldn't use it anywhere other than locally or the backend


jcode
OP

2 years ago

Hmm cuz I get CORS via frontend


2 years ago

oh, interesting


jcode
OP

2 years ago

I think for security reasons, they have put CORS on, so people don't use it via frontend tbh


2 years ago

yea probably


jcode
OP

2 years ago

Where can I find these?

environmentId: "9fb4baf0-809a-40ec-af32-751f50890802"

serviceId: "4bd252dc-c4ac-4c2e-a52f-051804292035"

(The above are from docs)


2 years ago

open your service, then press ctrl+k then search debug and you can find all those ids there


Welcome!

Sign in to your Railway account to join the conversation.

Loading...