UNPKG

@crazyrabbitltc/railway-mcp

Version:

Railway MCP Server - 146+ tools with 100% Railway API coverage, comprehensive MCP testing framework, and real infrastructure management through AI assistants. Enhanced version with enterprise features, based on original work by Jason Tan.

95 lines (94 loc) 2.29 kB
export class CustomDomainRepository { client; constructor(client) { this.client = client; } async create(input) { const query = ` mutation customDomainCreate($input: CustomDomainCreateInput!) { customDomainCreate(input: $input) { id domain serviceId projectId status cnameTarget sslStatus createdAt updatedAt } } `; const data = await this.client.request(query, { input }); return data.customDomainCreate; } async update(input) { const query = ` mutation customDomainUpdate($input: CustomDomainUpdateInput!) { customDomainUpdate(input: $input) { id domain serviceId projectId status cnameTarget sslStatus updatedAt } } `; const data = await this.client.request(query, { input }); return data.customDomainUpdate; } async delete(id) { const query = ` mutation customDomainDelete($id: String!) { customDomainDelete(id: $id) } `; const data = await this.client.request(query, { id }); return data.customDomainDelete; } async list(projectId) { const query = ` query customDomains($projectId: String!) { customDomains(projectId: $projectId) { edges { node { id domain serviceId projectId status cnameTarget sslStatus createdAt updatedAt } } } } `; const data = await this.client.request(query, { projectId }); return data.customDomains.edges.map(edge => edge.node); } async get(id) { const query = ` query customDomain($id: String!) { customDomain(id: $id) { id domain serviceId projectId status cnameTarget sslStatus createdAt updatedAt } } `; const data = await this.client.request(query, { id }); return data.customDomain; } }