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 @
Attachments
15 Replies
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
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
}
}Attachments
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()```2 months ago
Can you try doing it via https://railway.com/graphiql and see if the issue persists there?
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
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
It worked fine for another random domain, so not sure if there's something getting cached incorrectly or whats happening