Graphic API error: Problem processing request
michael88
PROOP

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

michael88
PROOP

9 months ago

project id: a6282f66-f341-4dce-9402-25ea0f077c05


brody
EMPLOYEE

9 months ago

hello,

you can set variables with the CLI, just auth with a token -


michael88
PROOP

9 months ago

can you create environments though?


michael88
PROOP

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


michael88
PROOP

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 ☺️


brody
EMPLOYEE

9 months ago

yes -


xsharing
PRO

9 months ago

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)


michael88
PROOP

9 months ago

ahh nice one, thanks I'll try that!


Loading...