Version: unstable
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/unstable/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation updateCustomerMetafields($input: CustomerInput!) { customerUpdate(input: $input) { customer { id metafields(first: 3) { edges { node { id namespace key value } } } } userErrors { message field } } }\",\n \"variables\": {\n \"input\": {\n \"metafields\": [\n {\n \"namespace\": \"my_field\",\n \"key\": \"nickname\",\n \"type\": \"single_line_text_field\",\n \"value\": \"rob\"\n },\n {\n \"id\": \"gid://shopify/Metafield/1069230189\",\n \"value\": \"they/them\"\n }\n ],\n \"id\": \"gid://shopify/Customer/1018520244\"\n }\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation updateCustomerMetafields($input: CustomerInput!) {\n customerUpdate(input: $input) {\n customer {\n id\n metafields(first: 3) {\n edges {\n node {\n id\n namespace\n key\n value\n }\n }\n }\n }\n userErrors {\n message\n field\n }\n }\n }`,\n \"variables\": {\n \"input\": {\n \"metafields\": [\n {\n \"namespace\": \"my_field\",\n \"key\": \"nickname\",\n \"type\": \"single_line_text_field\",\n \"value\": \"rob\"\n },\n {\n \"id\": \"gid://shopify/Metafield/1069230189\",\n \"value\": \"they/them\"\n }\n ],\n \"id\": \"gid://shopify/Customer/1018520244\"\n }\n },\n },\n});\n" Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n mutation updateCustomerMetafields($input: CustomerInput!) {\n customerUpdate(input: $input) {\n customer {\n id\n metafields(first: 3) {\n edges {\n node {\n id\n namespace\n key\n value\n }\n }\n }\n }\n userErrors {\n message\n field\n }\n }\n }\nQUERY\n\nvariables = {\n \"input\": {\n \"metafields\": [{\"namespace\"=>\"my_field\", \"key\"=>\"nickname\", \"type\"=>\"single_line_text_field\", \"value\"=>\"rob\"}, {\"id\"=>\"gid://shopify/Metafield/1069230189\", \"value\"=>\"they/them\"}],\n \"id\": \"gid://shopify/Customer/1018520244\"\n }\n}\n\nresponse = client.query(query: query, variables: variables)\n" PHP example: "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<[\n \"metafields\" => [{\"namespace\"=>\"my_field\", \"key\"=>\"nickname\", \"type\"=>\"single_line_text_field\", \"value\"=>\"rob\"}, {\"id\"=>\"gid://shopify/Metafield/1069230189\", \"value\"=>\"they/them\"}],\n \"id\" => \"gid://shopify/Customer/1018520244\",\n ],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation updateCustomerMetafields($input: CustomerInput!) {\n customerUpdate(input: $input) {\n customer {\n id\n metafields(first: 3) {\n edges {\n node {\n id\n namespace\n key\n value\n }\n }\n }\n }\n userErrors {\n message\n field\n }\n }\n }`,\n {\n variables: {\n \"input\": {\n \"metafields\": [\n {\n \"namespace\": \"my_field\",\n \"key\": \"nickname\",\n \"type\": \"single_line_text_field\",\n \"value\": \"rob\"\n },\n {\n \"id\": \"gid://shopify/Metafield/1069230189\",\n \"value\": \"they/them\"\n }\n ],\n \"id\": \"gid://shopify/Customer/1018520244\"\n }\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation updateCustomerMetafields($input: CustomerInput!) {\n customerUpdate(input: $input) {\n customer {\n id\n metafields(first: 3) {\n edges {\n node {\n id\n namespace\n key\n value\n }\n }\n }\n }\n userErrors {\n message\n field\n }\n }\n}"
input: { "input": { "metafields": [ { "namespace": "my_field", "key": "nickname", "type": "single_line_text_field", "value": "rob" }, { "id": "gid://shopify/Metafield/1069230189", "value": "they/them" } ], "id": "gid://shopify/Customer/1018520244" } }
response: { "data": { "customerUpdate": { "customer": { "id": "gid://shopify/Customer/1018520244", "metafields": { "edges": [ { "node": { "id": "gid://shopify/Metafield/1069230189", "namespace": "my_field", "key": "pronouns", "value": "they/them" } }, { "node": { "id": "gid://shopify/Metafield/1069230190", "namespace": "my_field", "key": "nickname", "value": "rob" } } ] } }, "userErrors": [] } } }
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/unstable/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation CustomerAddressCreate($customerId: ID!, $addresses: [MailingAddressInput!]) { customerUpdate(input: {id: $customerId, addresses: $addresses}) { customer { id addressesV2(first: 10) { edges { node { id address1 city } } } } userErrors { field message } } }\",\n \"variables\": {\n \"customerId\": \"gid://shopify/Customer/1018520244\",\n \"addresses\": [\n {\n \"address1\": \"123 New Address\",\n \"city\": \"New City\"\n }\n ]\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation CustomerAddressCreate($customerId: ID!, $addresses: [MailingAddressInput!]) {\n customerUpdate(input: {id: $customerId, addresses: $addresses}) {\n customer {\n id\n addressesV2(first: 10) {\n edges {\n node {\n id\n address1\n city\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }`,\n \"variables\": {\n \"customerId\": \"gid://shopify/Customer/1018520244\",\n \"addresses\": [\n {\n \"address1\": \"123 New Address\",\n \"city\": \"New City\"\n }\n ]\n },\n },\n});\n" Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n mutation CustomerAddressCreate($customerId: ID!, $addresses: [MailingAddressInput!]) {\n customerUpdate(input: {id: $customerId, addresses: $addresses}) {\n customer {\n id\n addressesV2(first: 10) {\n edges {\n node {\n id\n address1\n city\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }\nQUERY\n\nvariables = {\n \"customerId\": \"gid://shopify/Customer/1018520244\",\n \"addresses\": [{\"address1\"=>\"123 New Address\", \"city\"=>\"New City\"}]\n}\n\nresponse = client.query(query: query, variables: variables)\n" PHP example: "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<\"gid://shopify/Customer/1018520244\",\n \"addresses\" => [{\"address1\"=>\"123 New Address\", \"city\"=>\"New City\"}],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation CustomerAddressCreate($customerId: ID!, $addresses: [MailingAddressInput!]) {\n customerUpdate(input: {id: $customerId, addresses: $addresses}) {\n customer {\n id\n addressesV2(first: 10) {\n edges {\n node {\n id\n address1\n city\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }`,\n {\n variables: {\n \"customerId\": \"gid://shopify/Customer/1018520244\",\n \"addresses\": [\n {\n \"address1\": \"123 New Address\",\n \"city\": \"New City\"\n }\n ]\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation CustomerAddressCreate($customerId: ID!, $addresses: [MailingAddressInput!]) {\n customerUpdate(input: {id: $customerId, addresses: $addresses}) {\n customer {\n id\n addressesV2(first: 10) {\n edges {\n node {\n id\n address1\n city\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n}"
input: { "customerId": "gid://shopify/Customer/1018520244", "addresses": [ { "address1": "123 New Address", "city": "New City" } ] }
response: { "data": { "customerUpdate": { "customer": { "id": "gid://shopify/Customer/1018520244", "addressesV2": { "edges": [ { "node": { "id": "gid://shopify/MailingAddress/1053318591?model_name=CustomerAddress", "address1": "123 New Address", "city": "New City" } } ] } }, "userErrors": [] } } }
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/unstable/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation CustomerAddressSet($customerId: ID!, $addresses: [MailingAddressInput!]) { customerUpdate(input: {id: $customerId, addresses: $addresses}) { customer { id addressesV2(first: 10) { edges { node { id address1 city } } } } userErrors { field message } } }\",\n \"variables\": {\n \"customerId\": \"gid://shopify/Customer/1018520244\",\n \"addresses\": [\n {\n \"address1\": \"123 Main St\",\n \"city\": \"Metropolis\"\n },\n {\n \"address1\": \"456 Elm St\",\n \"city\": \"Gotham\"\n }\n ]\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation CustomerAddressSet($customerId: ID!, $addresses: [MailingAddressInput!]) {\n customerUpdate(input: {id: $customerId, addresses: $addresses}) {\n customer {\n id\n addressesV2(first: 10) {\n edges {\n node {\n id\n address1\n city\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }`,\n \"variables\": {\n \"customerId\": \"gid://shopify/Customer/1018520244\",\n \"addresses\": [\n {\n \"address1\": \"123 Main St\",\n \"city\": \"Metropolis\"\n },\n {\n \"address1\": \"456 Elm St\",\n \"city\": \"Gotham\"\n }\n ]\n },\n },\n});\n" Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n mutation CustomerAddressSet($customerId: ID!, $addresses: [MailingAddressInput!]) {\n customerUpdate(input: {id: $customerId, addresses: $addresses}) {\n customer {\n id\n addressesV2(first: 10) {\n edges {\n node {\n id\n address1\n city\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }\nQUERY\n\nvariables = {\n \"customerId\": \"gid://shopify/Customer/1018520244\",\n \"addresses\": [{\"address1\"=>\"123 Main St\", \"city\"=>\"Metropolis\"}, {\"address1\"=>\"456 Elm St\", \"city\"=>\"Gotham\"}]\n}\n\nresponse = client.query(query: query, variables: variables)\n" PHP example: "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<\"gid://shopify/Customer/1018520244\",\n \"addresses\" => [{\"address1\"=>\"123 Main St\", \"city\"=>\"Metropolis\"}, {\"address1\"=>\"456 Elm St\", \"city\"=>\"Gotham\"}],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation CustomerAddressSet($customerId: ID!, $addresses: [MailingAddressInput!]) {\n customerUpdate(input: {id: $customerId, addresses: $addresses}) {\n customer {\n id\n addressesV2(first: 10) {\n edges {\n node {\n id\n address1\n city\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }`,\n {\n variables: {\n \"customerId\": \"gid://shopify/Customer/1018520244\",\n \"addresses\": [\n {\n \"address1\": \"123 Main St\",\n \"city\": \"Metropolis\"\n },\n {\n \"address1\": \"456 Elm St\",\n \"city\": \"Gotham\"\n }\n ]\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation CustomerAddressSet($customerId: ID!, $addresses: [MailingAddressInput!]) {\n customerUpdate(input: {id: $customerId, addresses: $addresses}) {\n customer {\n id\n addressesV2(first: 10) {\n edges {\n node {\n id\n address1\n city\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n}"
input: { "customerId": "gid://shopify/Customer/1018520244", "addresses": [ { "address1": "123 Main St", "city": "Metropolis" }, { "address1": "456 Elm St", "city": "Gotham" } ] }
response: { "data": { "customerUpdate": { "customer": { "id": "gid://shopify/Customer/1018520244", "addressesV2": { "edges": [ { "node": { "id": "gid://shopify/MailingAddress/1053318585?model_name=CustomerAddress", "address1": "123 Main St", "city": "Metropolis" } }, { "node": { "id": "gid://shopify/MailingAddress/1053318586?model_name=CustomerAddress", "address1": "456 Elm St", "city": "Gotham" } } ] } }, "userErrors": [] } } }
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/unstable/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation customerUpdate($input: CustomerInput!) { customerUpdate(input: $input) { userErrors { field message } customer { id firstName } } }\",\n \"variables\": {\n \"input\": {\n \"id\": \"gid://shopify/Customer/1\",\n \"firstName\": \"Tobi\"\n }\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation customerUpdate($input: CustomerInput!) {\n customerUpdate(input: $input) {\n userErrors {\n field\n message\n }\n customer {\n id\n firstName\n }\n }\n }`,\n \"variables\": {\n \"input\": {\n \"id\": \"gid://shopify/Customer/1\",\n \"firstName\": \"Tobi\"\n }\n },\n },\n});\n" Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n mutation customerUpdate($input: CustomerInput!) {\n customerUpdate(input: $input) {\n userErrors {\n field\n message\n }\n customer {\n id\n firstName\n }\n }\n }\nQUERY\n\nvariables = {\n \"input\": {\n \"id\": \"gid://shopify/Customer/1\",\n \"firstName\": \"Tobi\"\n }\n}\n\nresponse = client.query(query: query, variables: variables)\n" PHP example: "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<[\n \"id\" => \"gid://shopify/Customer/1\",\n \"firstName\" => \"Tobi\",\n ],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation customerUpdate($input: CustomerInput!) {\n customerUpdate(input: $input) {\n userErrors {\n field\n message\n }\n customer {\n id\n firstName\n }\n }\n }`,\n {\n variables: {\n \"input\": {\n \"id\": \"gid://shopify/Customer/1\",\n \"firstName\": \"Tobi\"\n }\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation customerUpdate($input: CustomerInput!) {\n customerUpdate(input: $input) {\n userErrors {\n field\n message\n }\n customer {\n id\n firstName\n }\n }\n}"
input: { "input": { "id": "gid://shopify/Customer/1", "firstName": "Tobi" } }
response: { "data": { "customerUpdate": { "userErrors": [ { "field": [ "id" ], "message": "Customer does not exist" } ], "customer": null } } }
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/unstable/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation customerUpdate($input: CustomerInput!) { customerUpdate(input: $input) { userErrors { field message } customer { id firstName lastName } } }\",\n \"variables\": {\n \"input\": {\n \"id\": \"gid://shopify/Customer/1018520244\",\n \"firstName\": \"Tobi\",\n \"lastName\": \"Lutke\"\n }\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation customerUpdate($input: CustomerInput!) {\n customerUpdate(input: $input) {\n userErrors {\n field\n message\n }\n customer {\n id\n firstName\n lastName\n }\n }\n }`,\n \"variables\": {\n \"input\": {\n \"id\": \"gid://shopify/Customer/1018520244\",\n \"firstName\": \"Tobi\",\n \"lastName\": \"Lutke\"\n }\n },\n },\n});\n" Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n mutation customerUpdate($input: CustomerInput!) {\n customerUpdate(input: $input) {\n userErrors {\n field\n message\n }\n customer {\n id\n firstName\n lastName\n }\n }\n }\nQUERY\n\nvariables = {\n \"input\": {\n \"id\": \"gid://shopify/Customer/1018520244\",\n \"firstName\": \"Tobi\",\n \"lastName\": \"Lutke\"\n }\n}\n\nresponse = client.query(query: query, variables: variables)\n" PHP example: "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<[\n \"id\" => \"gid://shopify/Customer/1018520244\",\n \"firstName\" => \"Tobi\",\n \"lastName\" => \"Lutke\",\n ],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation customerUpdate($input: CustomerInput!) {\n customerUpdate(input: $input) {\n userErrors {\n field\n message\n }\n customer {\n id\n firstName\n lastName\n }\n }\n }`,\n {\n variables: {\n \"input\": {\n \"id\": \"gid://shopify/Customer/1018520244\",\n \"firstName\": \"Tobi\",\n \"lastName\": \"Lutke\"\n }\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation customerUpdate($input: CustomerInput!) {\n customerUpdate(input: $input) {\n userErrors {\n field\n message\n }\n customer {\n id\n firstName\n lastName\n }\n }\n}"
input: { "input": { "id": "gid://shopify/Customer/1018520244", "firstName": "Tobi", "lastName": "Lutke" } }
response: { "data": { "customerUpdate": { "userErrors": [], "customer": { "id": "gid://shopify/Customer/1018520244", "firstName": "Tobi", "lastName": "Lutke" } } } }
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/unstable/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation CustomerAddressUpdate($customerId: ID!, $addresses: [MailingAddressInput!]) { customerUpdate(input: {id: $customerId, addresses: $addresses}) { customer { id addressesV2(first: 10) { edges { node { id address1 city } } } } userErrors { field message } } }\",\n \"variables\": {\n \"customerId\": \"gid://shopify/Customer/1018520244\",\n \"addresses\": [\n {\n \"address1\": \"123 New Street\",\n \"city\": \"New City\"\n }\n ]\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation CustomerAddressUpdate($customerId: ID!, $addresses: [MailingAddressInput!]) {\n customerUpdate(input: {id: $customerId, addresses: $addresses}) {\n customer {\n id\n addressesV2(first: 10) {\n edges {\n node {\n id\n address1\n city\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }`,\n \"variables\": {\n \"customerId\": \"gid://shopify/Customer/1018520244\",\n \"addresses\": [\n {\n \"address1\": \"123 New Street\",\n \"city\": \"New City\"\n }\n ]\n },\n },\n});\n" Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n mutation CustomerAddressUpdate($customerId: ID!, $addresses: [MailingAddressInput!]) {\n customerUpdate(input: {id: $customerId, addresses: $addresses}) {\n customer {\n id\n addressesV2(first: 10) {\n edges {\n node {\n id\n address1\n city\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }\nQUERY\n\nvariables = {\n \"customerId\": \"gid://shopify/Customer/1018520244\",\n \"addresses\": [{\"address1\"=>\"123 New Street\", \"city\"=>\"New City\"}]\n}\n\nresponse = client.query(query: query, variables: variables)\n" PHP example: "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<\"gid://shopify/Customer/1018520244\",\n \"addresses\" => [{\"address1\"=>\"123 New Street\", \"city\"=>\"New City\"}],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation CustomerAddressUpdate($customerId: ID!, $addresses: [MailingAddressInput!]) {\n customerUpdate(input: {id: $customerId, addresses: $addresses}) {\n customer {\n id\n addressesV2(first: 10) {\n edges {\n node {\n id\n address1\n city\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }`,\n {\n variables: {\n \"customerId\": \"gid://shopify/Customer/1018520244\",\n \"addresses\": [\n {\n \"address1\": \"123 New Street\",\n \"city\": \"New City\"\n }\n ]\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation CustomerAddressUpdate($customerId: ID!, $addresses: [MailingAddressInput!]) {\n customerUpdate(input: {id: $customerId, addresses: $addresses}) {\n customer {\n id\n addressesV2(first: 10) {\n edges {\n node {\n id\n address1\n city\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n}"
input: { "customerId": "gid://shopify/Customer/1018520244", "addresses": [ { "address1": "123 New Street", "city": "New City" } ] }
response: { "data": { "customerUpdate": { "customer": { "id": "gid://shopify/Customer/1018520244", "addressesV2": { "edges": [ { "node": { "id": "gid://shopify/MailingAddress/1053318595?model_name=CustomerAddress", "address1": "123 New Street", "city": "New City" } } ] } }, "userErrors": [] } } }