Railway public API - Deprecated field issue
paulip114
FREEOP

a year ago

Warning: "The field User.projects is deprecated. This field will not return anything anymore, go through the workspace's projects"

Issue:

  1. Although got this warning, I can still retrieve the return data. (It only return 1 project, but I got 3 projects)

  2. The warning told me to use workspace's projects. However, there is no projects field under workspace/workspaces

My query be like:

query getProjectServices {
  me {
    projects {
      edges {
        # cursor
        node {
          name
          id
          updatedAt
          services {
            edges {
              node {
                name
                id
              }
            }
          }
        }
      }
    }
  }
}
Solved

3 Replies

a year ago

Hello,

You want to query workspace and then go through team to get the teams projects and services, something like this -

query getProjectServices($workspaceId: String!) {
  workspace(workspaceId: $workspaceId) {
    team {
      projects {
        edges {
          node {
            id
            name
            updatedAt
            services {
              edges {
                node {
                  name
                  id
                }
              }
            }
          }
        }
      }
    }
  }
}
{
  "workspaceId": ""
}

Status changed to Awaiting User Response Railway 12 months ago


brody

Hello,You want to query workspace and then go through team to get the teams projects and services, something like this -query getProjectServices($workspaceId: String!) { workspace(workspaceId: $workspaceId) { team { projects { edges { node { id name updatedAt services { edges { node { name id } } } } } } } } }{ "workspaceId": "" }

paulip114
FREEOP

a year ago

Thanks Brody, this solution really helps!!


Status changed to Awaiting Railway Response Railway 12 months ago


a year ago

No problem!


Status changed to Awaiting User Response Railway 12 months ago


Status changed to Solved brody 12 months ago


Loading...