STAGING-only Service Creation: GraphQL API Environment Isolation Conflict
lazycats-srl
OP

3 hours ago

Hi Railway Support,

We need to create one temporary, private QA service in an existing STAGING environment, without creating any service instance or modifying configuration in Production.

Our live GraphQL schema describes ServiceCreateInput.environmentId as restricting creation to a single environment only when that environment is a fork. For non-fork environments, it indicates that creation can extend to all non-fork environments.

However, Railway's official agent documentation describes environmentId as creating a service only in the specified environment.

Could you please confirm:

  1. Does serviceCreate with environmentId create a service instance in Production when the target is a persistent, non-fork STAGING environment?
  2. Is there a supported API or dashboard procedure to create a new service exclusively in STAGING, with absolutely no Production instance?
  3. If not, can an existing service have an instance added only to STAGING, or would a separate Railway project be required for strict isolation?

We need a documented, production-safe method before proceeding.

Thank you!

Awaiting User Response

1 Replies

Railway
BOT

3 hours ago

Changes made to a service are scoped to a single environment, and the dashboard path for this is to select STAGING in the environment switcher, add the service there, and apply the resulting staged change, which only commits to that environment (Environments, Staged Changes).

Before and after creating it, you can confirm Production is untouched by running the environment(id:) query against your Production environment ID and checking that its serviceInstances list does not include the new service (Manage Environments with the Public API). The same check works if you create the service through the API instead.

If your requirement is that no Production instance can exist under any circumstances, a separate project gives the strictest boundary, since services in one project cannot reach services in another over private networking (Advanced Usage).


Status changed to Awaiting User Response Railway • about 3 hours ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...