New Shopify Certification now available: Liquid Storefronts for Theme Developers

bulkOperationRunMutation Bulk mutations cannot contain more than 1 connection.

GrantDB
Shopify Partner
67 3 13

I am using productCreate with bulkOperationRunMutation 

I am sending my graphql like this

mutation
		{
			bulkOperationRunMutation(
				mutation: "mutation call($input: ProductInput!) { productCreate(input: $input) { product {id handle tags variants {
                        edges {
                            node {
                              id
                              sku
                              inventoryManagement
                              metafields {
                              edges {
                                node {
                                    description
                                    id
                                    key
                                    legacyResourceId
                                    namespace
                                    value
                                    valueType
                                }
                              }
                         }
                              
                              
                              
                            }                    
                        }
                    }} userErrors { message field } } }",
    stagedUploadPath: "%s") {
			bulkOperation
		{
			id
		url
		status
		}
		userErrors
		{
			message
		field
		}
		}
		}

 

 However, I get this error: Bulk mutations cannot contain more than 1 connection.

I have narrowed that down to the metafields {} part.  I use that so that I can store some of the data, to use again

Is there any way around that, to return metadata field data, in the response file

Thanks

Grant

Replies 2 (2)
alex0000
Shopify Partner
10 0 2

I face the same issue, can someone help ? 

Moritz-PV
Tourist
9 0 2

The mutation output contains two connections (nested node { edges { ... }}).
There is variants { edges { node { ... metafield { edges { node { ....
Remove the metafield output and it will work. This is only the output of the mutation that is passed back to the user. It does not affect what the mutation does.