def METHOD_NAME(host, query, variables):
    parsed_url = urlparse(host)
    if not (parsed_url.scheme and parsed_url.netloc):
        raise click.UsageError(
            f"Host {host} is not a valid URL. Host URL should include scheme ie http://localhost."
        )
    sanity_check = requests.get(urljoin(host, "/server_info"))
    sanity_check.raise_for_status()
    if "dagster_webserver" not in sanity_check.text:
        raise click.UsageError(
            f"Host {host} failed sanity check. It is not a dagster-webserver instance."
        )
    response = requests.post(
        urljoin(host, "/graphql"),
        # send query and vars as post body to avoid uri length limits
        json={"query": query, "variables": variables},
    )
    response.raise_for_status()
    str_res = response.json()
    return str_res