#tons of small questions (graphql, ...)
39 messages · Page 1 of 1 (latest)
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
you just click on that and it copies the deployment id
although, for your use-case this won't work long-term
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
Thanks that works.
How do I authorize for graphq ?
{"Authorization": "Bearer <API_TOKEN_GOES_HERE>"} in headers
you can get a token from your railway account settings
yeah no i'l fetch the latest deployment id and use that
Yeah but like, how do I do it in the Railway GraphQL Playground?
click on headers, then put the header above in there
Oh lol didn't see that, my bad
no worries
GraphQL API is only accessible via backend?
It's accessible anywhere, though I wouldn't use it anywhere other than locally or the backend
Hmm cuz I get CORS via frontend
oh, interesting
I think for security reasons, they have put CORS on, so people don't use it via frontend tbh
yea probably
Where can I find these?
environmentId: "9fb4baf0-809a-40ec-af32-751f50890802"
serviceId: "4bd252dc-c4ac-4c2e-a52f-051804292035"
(The above are from docs)
open your service, then press ctrl+k then search debug and you can find all those ids there
Hmm the serviceId for both my services are the same when in the same project?
no no, each service will have unique service ids
Oh okay I might have mistaken then
For some reason when I ask to buildLogs for my deployment id, I get logs back that belong to that deployment id + logs from a different service and deployment. How can that even happen?
For example these logs at the end are NOT from that deployment
I tried graphql within railway itself and there when I do the deployment thing to get the last deployment for that service id, i get the deployment back from the other service? I checked the service id and it's correct.
I think there must be something wrong with Railway API
I'm honestly not sure myself, though perhaps you could just filter through the logs by service id so you only get the service you're looking for?
I think (maybe) that fetching the last deployment actually just searched inside project and finds the last deployment.
It doesn't seem to do anything with the given serviceId.
Can you factcheck this?
A working but bad workaround.
what is "ages"?
Weeks
It was at 78% and dropped to 76% for some odd reason
Just mentioning, Railway metal usage resets monthly because it's based on your current monthly billing.