Trying to import the following data (which was originally JSON, but has since been through parse_json filter and then logged):
[{"type_name":"module_14/attribute","id":"7501355","properties":[{"name":"name","value":"Your Chosen Size"},{"name":"enabled","value":true},{"name":"module_field_14/product_attribute_1","value":"4161"}]},{"type_name":"module_14/product_attribute_option","id":"49443398","properties":[{"name":"name","value":"24\" x 24\""},{"name":"enabled","value":"true"},{"name":"module_field_14/product_attribute_option_1","value":"7501355"},{"name":"module_field_14/product_attribute_option_2","value":"0"}]}]
Using the mutation:
{% graphql g, data: params.data %}
mutation import_attributes($data: [CustomizationImport!]!) {
import_models(models: $data, _index_rebuild: true) {
ids
}
}
{% endgraphql %}
But I don't understand the error message:
GraphQL Error: Variable $data of type [CustomizationImport!]! was provided invalid value for 0.properties (Can not coerce... to HashObject.) I understand from experimentation and the message that the problem is the properties key and its array value, but I don't understand what the correct format should be or how to get to that format using Liquid filters- I would assume a parse_json filter should do this for me?
Thanks,