feat: List shipping options for cart (#6677)

This commit is contained in:
Oli Juhl
2024-03-13 09:08:47 +00:00
committed by GitHub
parent db26dafa85
commit 25d176b851
23 changed files with 855 additions and 142 deletions
@@ -777,7 +777,7 @@ export class RemoteJoiner {
// remove alias from fields
const parentPath = [BASE_PATH, ...currentPath].join(".")
const parentExpands = parsedExpands.get(parentPath)
parentExpands.fields = parentExpands.fields.filter(
parentExpands.fields = parentExpands.fields?.filter(
(field) => field !== property
)
@@ -787,12 +787,13 @@ export class RemoteJoiner {
)
)
const parentFieldAlias = fullPath[Math.max(fullPath.length - 2, 0)]
implodeMapping.push({
location: [...currentPath],
property,
path: fullPath,
isList: !!serviceConfig.relationships?.find(
(relationship) => relationship.alias === fullPath[0]
(relationship) => relationship.alias === parentFieldAlias
)?.isList,
})