From 3538beef65540d3d55c8e6dfbdde82526dd1f53c Mon Sep 17 00:00:00 2001 From: Michael Bromley Date: Wed, 15 Nov 2023 10:26:00 +0100 Subject: [PATCH] fix(admin-ui): Fix handling of Country custom fields --- .../src/lib/core/src/data/utils/add-custom-fields.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/admin-ui/src/lib/core/src/data/utils/add-custom-fields.ts b/packages/admin-ui/src/lib/core/src/data/utils/add-custom-fields.ts index 2eef74e0a1..41857e9b66 100644 --- a/packages/admin-ui/src/lib/core/src/data/utils/add-custom-fields.ts +++ b/packages/admin-ui/src/lib/core/src/data/utils/add-custom-fields.ts @@ -28,6 +28,11 @@ export function addCustomFields(documentNode: DocumentNode, customFields: Custom entityType = 'Address'; } + if (entityType === ('Country' as any)) { + // Country is an alias of Region + entityType = 'Region'; + } + const customFieldsForType = customFields[entityType]; if (customFieldsForType && customFieldsForType.length) { (fragmentDef.selectionSet.selections as SelectionNode[]).push({