forked from getconversio/go-shopify
    
        
        - 
                Notifications
    
You must be signed in to change notification settings  - Fork 275
 
Open
Description
I have a product with a custom metafield of type list of files .
I've tried the following to pass information (some images):
        shop.Metafield{
			Key:       key,
			Namespace: ns,
			Value:    `["gid://shopify/ProductImage/66131787907409"]`,
			Type: shop.MetafieldType("list.file_reference"),
		}
I get the error
metafields.value: must be a file reference string. 
For debugging purposes I also tried only one value/string
           shop.Metafield{
			Key:       key,
			Namespace: ns,
			Value:    `"gid://shopify/ProductImage/66131787907409"`,
			Type: shop.MetafieldType("list.file_reference"),
		}
I get the error: metafields.value: must be an array. 
Also tried:
              shop.Metafield{
			Key:       key,
			Namespace: ns,
			Value:    []string{"gid://shopify/ProductImage/66131787907409"},
			Type: shop.MetafieldType("list.file_reference"),
		}
I get error value: expected Array to be a String 
Any idea how am I supposed to pass a list of files (images) ? This drives me absolutely crazy! I've spent 4 hours trying to fix this...
Metadata
Metadata
Assignees
Labels
No labels