@absolutejs/engagement-apollo 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -133,7 +133,10 @@ var apolloSource = (options) => {
|
|
|
133
133
|
const enrichCompany = async (query) => {
|
|
134
134
|
if (!query.domain)
|
|
135
135
|
return null;
|
|
136
|
-
const
|
|
136
|
+
const params = new URLSearchParams({ domain: query.domain });
|
|
137
|
+
if (query.name?.trim())
|
|
138
|
+
params.set("name", query.name.trim());
|
|
139
|
+
const json = await get(`/v1/organizations/enrich?${params.toString()}`);
|
|
137
140
|
const org = json && isRecord(json.organization) ? json.organization : null;
|
|
138
141
|
if (!org)
|
|
139
142
|
return null;
|