{
getProductDetails(input: { sku: "FUR_BED_02" }) {
itemId
categories {
id
}
children {
sku
price {
itemId
priceListId
}
inventory {
itemId
inStock
}
}
price {
priceListId
}
inventory {
itemId
inStock
}
attributes {
name
value
description
type
}
}
}
{
getShopifyProductDetails(id: "gid://shopify/Product/6633850011887") {
id
totalInventory
tracksInventory
priceRangeV2 {
maxVariantPrice {
amount
currencyCode
}
minVariantPrice {
amount
currencyCode
}
}
giftCardTemplateSuffix
handle
images(first: 10) {
edges {
node {
altText
id
originalSrc
}
}
}
metafields(first: 10) {
edges {
node {
id
namespace
ownerType
value
description
key
}
}
}
productType
publishedAt
tags
templateSuffix
title
variants(first: 10) {
edges {
node {
id
}
}
}
vendor
description
metafield(namespace: "my_fields", key: "product_description") {
id
namespace
ownerType
value
}
}
}
Make this:
metafields(first: 10) {
edges {
node {
id
namespace
ownerType
value
description
key
}
}
}
look like this:
attributes {
name
value
description
type
}
origin | dest |
---|---|
metafields.edges[*].node.description | attributes[*].description |
metafields.edges[*].node.key | attributes[*].name |
metafields.edges[*].node.ownerType | attributes[*].type |
metafields.edges[*].node.value | attributes[*].value |
map(compose(zipObject(['description', 'id', 'name', 'namespace', 'type', 'value']), map(get('[1]')), sortBy('[0]'), toPairs, get('node')), get('steps[0].data.metafields.edges'))
map(compose(map(compose(compose(zipObject(['description', 'id', 'name', 'namespace', 'type', 'value']), map(get('[1]'))), sortBy('[0]'), toPairs, get('node'))), get('metafields.edges')), get('data.getShopifyProductList.items', steps[0]))
_.map(
_.compose(
_.compose(
_.zipObject(['description', 'id', 'name', 'namespace', 'type', 'value']),
_.map(_.get('[1]'))
),
_.sortBy('[0]'),
_.toPairs,
_.get('node')
),
_.get('metafields.edges', step)
)
map(compose(compose(zipObject(['description', 'id', 'name', 'namespace', 'type', 'value']), map(get('[1]'))), sortBy('[0]'), toPairs, get('node')), get('metafields.edges', steps[1]))