You can’t use all properties. Instead, you should use the ‘properties’ key. For example:
attribute(key: “discount”) {
key
value
}
Issue: A developer struggled to query custom data from the properties attribute on cart lines using GraphQL in Shopify Functions.
Initial Problem:
properties fieldSolution Found:
Custom properties must be queried using a specific key prefix:
attribute(key: "_custom_data")
Key Technical Constraints:
Ongoing Challenge:
For expanded products with variable/dynamic property names, developers face limitations:
Status: Partial resolution—basic querying works, but handling dynamic properties across varied products remains complex.
You can’t use all properties. Instead, you should use the ‘properties’ key. For example:
attribute(key: “discount”) {
key
value
}