9 months ago
This mutation fails:
mutation($input:VariableUpsertInput!) {
variableUpsert(input:$input)
}
// variables:
{
"input": {
"environmentId": "***",
"name":"***",
"projectId": "***",
"serviceId": "***",
"value": "***"
}
}The error is:
{
"errors": [
{
"message": "Problem processing request",
"traceId": "3707103883129546512"
}
],
"data": null
}I'm just trying to add a variable to a service. I'm (almost) certain my variables are correct.
I've done other similar mutations that works so its nothing wrong with my auth/syntax afaik.
Any help appreciated!
PS - I'd love to use the railway cli instead of graphql, as I'm making a github action, but afaik you need to do railway login which is not possible through github actions?
Thanks in advance!
8 Replies
9 months ago
project id: a6282f66-f341-4dce-9402-25ea0f077c05
9 months ago
hello,
you can set variables with the CLI, just auth with a token -
9 months ago
can you create environments though?
9 months ago
I'm getting this error when I try that (the env variable RAILWAYAPITOKEN is set with a token that lets me create a new environment using graphql):
Error: Not logged into Railway CLI
Please run: railway login
9 months ago
Any updates? I wonder why my graphql request fails, even if its possible to do it with the cli, I'd love to find out why ☺️
9 months ago
yes -
We encountered same problem and finally got it worked.
What we should do is..
make sure RAILWAY_TOKEN is not set(or you can unset it) <- this is the not so obvious part, imho
RAILWAY_TOKEN has precedence
set RAILWAYAPITOKEN
(link and environment new worked, at least)
9 months ago
ahh nice one, thanks I'll try that!