• import { queryRelated } from '@esri/arcgis-rest-feature-layer'
    //
    queryRelated({
    url: "http://services.myserver/OrgID/ArcGIS/rest/services/Petroleum/KSPetro/FeatureServer/0",
    relationshipId: 1,
    params: { returnCountOnly: true }
    })
    .then(response) // response.relatedRecords

    Query the related records for a feature service. See the REST Documentation for more information.

    Parameters

    Returns Promise<IQueryRelatedResponse>

    A Promise that will resolve with the query response