query DnsSettingsDrawer($id: ID!) {
    node(id: $id) {
        id
        ... on Domain {
            name(idn: false)
            ...ipAddressesFields
            dnsZone {
                ...recordsFields
            }
        }
        ... on DomainAlias {
            name(idn: false)
            domain {
                ...ipAddressesFields
            }
            dnsZone {
                ...recordsFields
            }
        }
    }
    viewer {
        login
        type
    }
    config {
        dns {
            enableResolveChecking
        }
    }
    dns {
        registrars {
            name
            url
        }
        extensions {
            name
            url
        }
    }
    mode {
        isDnsServiceSupported
    }
}

fragment ipAddressesFields on Domain {
    ipAddresses {
        publicIpAddress
        ipAddress
    }
}

fragment recordsFields on DnsZone {
    nsRecords: records(filter: { type: [NS] }, orderBy: { value: asc }) {
        ...recordFields
    }
    aRecords: records(filter: { type: [A] }) {
        ...recordFields
    }
}

fragment recordFields on DnsRecord {
    host
    value
    type
}
