INNER CODE UNIT · Python

create_environment

phasehq/console · backend/api/utils/syncing/railway/main.py:93

def create_environment(name, api_token):
    headers = get_headers(api_token)

    mutation = """
    mutation($name: String!) {
        createEnvironment(input: { name: $name }) {
            environment {
                id
                name
            }
        }
    }
    """
    variables = {"name": name}
    response = requests.post(
        RAILWAY_API_URL,
        json={"query": mutation, "variables": variables},
        headers=headers,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…