Cart Transform - Attribute Setting

The Cart Transform API documentation CartTransformRunResult shows that returning attributes in the result payload is possible for the linesMerge and linesExpand (expandedCartItems.attributes) operations, but it is not supported in the Rust implementation.

I get these errors when trying to set attributes in the correct places:

error[E0560]: struct `MergeOperation` has no field
named `attributes`
error[E0560]: struct `ExpandedItem` has no field
named `attributes`

Lines Merge: Cart Transform Function API

Lines Expand: Cart Transform Function API

Using the shopify_function crate v2.2.0

@Nate_C I’m not familiar with Rust, so I can’t test this to confirm, but can you try running the following through the CLI and see if either resolves the issue?

shopify app function schema
shopify app function typegen
cargo run

Ran the shopify app function schema and it looks like that did the trick. It was an issue with the schema.graphql file.

Thank you for the quick response!