#tons of small questions (graphql, ...)

39 messages · Page 1 of 1 (latest)

dapper breachBOT
#

Project ID: N/A

dusky pewter
#

tons of small questions (graphql, ...)

#

N/A

daring pumice
#

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

dusky pewter
#

Thanks that works.

How do I authorize for graphq ?

daring pumice
#

{"Authorization": "Bearer <API_TOKEN_GOES_HERE>"} in headers
you can get a token from your railway account settings

dusky pewter
dusky pewter
daring pumice
#

click on headers, then put the header above in there

dusky pewter
#

Oh lol didn't see that, my bad

daring pumice
#

no worries

dusky pewter
#

GraphQL API is only accessible via backend?

daring pumice
#

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

dusky pewter
daring pumice
#

oh, interesting

dusky pewter
#

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

daring pumice
#

yea probably

dusky pewter
#

Where can I find these?

environmentId: "9fb4baf0-809a-40ec-af32-751f50890802"
serviceId: "4bd252dc-c4ac-4c2e-a52f-051804292035"

(The above are from docs)

daring pumice
#

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

dusky pewter
#

Hmm the serviceId for both my services are the same when in the same project?

daring pumice
#

no no, each service will have unique service ids

dusky pewter
#

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

dusky pewter
#

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

daring pumice
#

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?

dusky pewter
#

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?

dusky pewter
#

I have been ages on Railway Metal, yet the usage percentage is decreasing?

deep path
#

what is "ages"?

dusky pewter
#

It was at 78% and dropped to 76% for some odd reason

dusty bramble
# dusky pewter

Just mentioning, Railway metal usage resets monthly because it's based on your current monthly billing.