Domain records bug
andremaytorena
PROOP

2 months ago

Hi, I added a custom domain to a service via the API and when I take a look at the records:

The name should be api not @

Screenshot_2026-03-18_at_17.47.32.png

Attachments

15 Replies

andremaytorena
PROOP

2 months ago

data = railway_graphql(
        CUSTOM_DOMAIN_CREATE_MUTATION,
        {
            "input": {
                "projectId": resolved_project_id,
                "environmentId": resolved_environment_id,
                "serviceId": clean_service_id,
                "domain": clean_domain,
            }
        },
        token,
        token_type,
        endpoint=endpoint,
    )```

2 months ago

Unable to reproduce it using the createCustomDomain mutation

image.png

Attachments


2 months ago

mutation {
  customDomainCreate(
    input: {domain: "test.thalles.me", environmentId: "1710c585-2b27-4536-ad3d-d112c4e2493d", serviceId: "17e825b9-10ab-47ca-9950-a9db651e5645", projectId: "dba5264a-c6b5-4e35-a140-406862e7b665", targetPort: 8000}
  ) {
    domain
  }
}

andremaytorena
PROOP

2 months ago

i was using another one, let me try that one instead


andremaytorena
PROOP

2 months ago

Screenshot_2026-03-18_at_18.01.52.png

Attachments


andremaytorena
PROOP

2 months ago

def _build_custom_domain_create_mutation_with_dns_fields(dns_fields: list[str]) -> str:
    dns_selection = " ".join(dns_fields) if dns_fields else "status"
    return f"""
mutation CustomDomainCreate($input: CustomDomainCreateInput!) {{
  customDomainCreate(input: $input) {{
    id
    domain
    serviceId
    environmentId
    projectId
    status {{
      certificateStatus
      dnsRecords {{
        {dns_selection}
      }}
    }}
  }}
}}
""".strip()```

andremaytorena
PROOP

2 months ago

Still the same issue


2 months ago

Can you try doing it via https://railway.com/graphiql and see if the issue persists there?


andremaytorena
PROOP

2 months ago

Also only returning 1 of the records when fetching the domain:

{'id': 'ea4bede9-41c3-44e6-b937-66453a1c3419', 'domain': 'api.jorge.com', 'serviceId': '6c44d45d-96ba-4a72-802b-a9c2852183fd', 'environmentId': 'beff97ed-9e44-404b-beeb-796c607f27d3', 'projectId': '8eca95b8-b3e6-413d-8ee9-deeebf5ebef1', 'status': {'certificateStatus': 'CERTIFICATE_STATUS_TYPE_VALIDATING_OWNERSHIP', 'dnsRecords': [{'status': 'DNS_RECORD_STATUS_PROPAGATED', 'recordType': 'DNS_RECORD_TYPE_CNAME', 'requiredValue': '6gq9iqfe.up.railway.app', 'currentValue': '', 'fqdn': 'api.jorge.com'}]}}

When there's two



andremaytorena
PROOP

2 months ago

Got it


andremaytorena
PROOP

2 months ago

I'll try to do it in a bit


andremaytorena
PROOP

2 months ago

Ok i tested it manually through the dashboard and i'm getting the same error, the domain is not registering the subdomain as the name


andremaytorena
PROOP

2 months ago

It worked fine for another random domain, so not sure if there's something getting cached incorrectly or whats happening


andremaytorena
PROOP

2 months ago

Ok it's working via the API now for other domains


Welcome!

Sign in to your Railway account to join the conversation.

Loading...