menu Updatemutation
mutation
2024-10latest
Requires write
access scope.
Updates a menu.
Arguments
Anchor to handlehandleThe menus's handle.
ID of the menu to be updated.
List of the menus' items.
The menu's title.
Was this section helpful?
MenuUpdatePayload returns
The updated menu.
The list of errors that occurred from executing the mutation.
Was this section helpful?
Code examples for MUTATION: menuUpdate
Query Reference for MUTATION: menuUpdate
"mutation menuUpdate($id: ID!, $items: [MenuItemUpdateInput!]!, $title: String!) {\n menuUpdate(id: $id, items: $items, title: $title) {\n menu {\n # Menu fields\n }\n userErrors {\n field\n message\n }\n }\n}"
Input Reference for MUTATION: menuUpdate
"{\n \"handle\": \"<your-handle>\",\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"items\": [\n {\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"items\": [\n {}\n ],\n \"resourceId\": \"gid://shopify/<objectName>/10079785100\",\n \"tags\": [\n \"<your-tags>\"\n ],\n \"title\": \"<your-title>\",\n \"type\": \"ARTICLE\",\n \"url\": \"<your-url>\"\n }\n ],\n \"title\": \"<your-title>\"\n}"
Schema Reference for MUTATION: menuUpdate
"input MenuItemUpdateInput {\n id: ID\n items: [MenuItemUpdateInput!]\n resourceId: ID\n tags: [String!]\n title: String!\n type: MenuItemType!\n url: String\n}\n"
Display Examples for MUTATION: menuUpdate
[ { "example": { "type_name": "menuupdate", "title": "Update a menu", "description": "Update a menu", "query_string": "mutation UpdateMenu($id: ID!, $title: String!, $handle: String!, $items: [MenuItemUpdateInput!]!) {\n menuUpdate(id: $id, title: $title, handle: $handle, items: $items) {\n menu {\n id\n handle\n items {\n id\n title\n items {\n id\n title\n }\n }\n }\n }\n}", "variables": { "id": "gid://shopify/Menu/442047006", "title": "updated menu", "handle": "danielstuff-main-menu", "items": [ { "id": "gid://shopify/MenuItem/398712010", "title": "Electronics", "url": "collection/tables", "resourceId": "gid://shopify/Collection/71762467", "type": "COLLECTION", "items": [] }, { "id": "gid://shopify/MenuItem/643685044", "title": "Furniture", "url": "/collections/furniture", "resourceId": "gid://shopify/Collection/643685044", "type": "COLLECTION", "items": [ { "id": "gid://shopify/MenuItem/927352226", "title": "Updated Living Room", "url": "/collections/living-room", "resourceId": "gid://shopify/Collection/927352226", "type": "COLLECTION", "items": [ { "id": "gid://shopify/MenuItem/307741084", "title": "Sofa", "url": "/collections/sofa", "resourceId": "gid://shopify/Collection/307741084", "type": "COLLECTION", "items": [] }, { "id": "gid://shopify/MenuItem/375350346", "title": "Sound System", "url": "/collections/sound-system", "resourceId": "gid://shopify/Collection/375350346", "type": "COLLECTION", "items": [] }, { "id": "gid://shopify/MenuItem/837241978", "title": "Massage Chairs", "url": "/collections/massage%20chairs", "resourceId": "gid://shopify/Collection/837241978", "type": "COLLECTION", "items": [] }, { "id": "gid://shopify/MenuItem/960081962", "title": "Living Room Rugs", "url": "/collections/living%20room%20rugs", "resourceId": "gid://shopify/Collection/960081962", "type": "COLLECTION", "items": [] } ] }, { "id": "gid://shopify/MenuItem/715378231", "title": "Kitchen", "url": "/collections/kitchen", "resourceId": "gid://shopify/Collection/715378231", "type": "COLLECTION", "items": [ { "id": "gid://shopify/MenuItem/108641250", "title": "Chairs", "url": "/collections/chairs", "resourceId": "gid://shopify/Collection/108641250", "type": "COLLECTION", "items": [] }, { "id": "gid://shopify/MenuItem/71762467", "title": "Tables", "url": "/collections/tables", "resourceId": "gid://shopify/Collection/71762467", "type": "COLLECTION", "items": [] }, { "id": "gid://shopify/MenuItem/826396515", "title": "Kitchen Rugs", "url": "/collections/kitchen%20rugs", "resourceId": "gid://shopify/Collection/826396515", "type": "COLLECTION", "items": [] } ] } ] }, { "id": "gid://shopify/MenuItem/698896745", "title": "Mega Sofa Sale", "url": "/collections/mega%20sale", "resourceId": "gid://shopify/Collection/307741084", "type": "COLLECTION", "items": [] } ] }, "response": { "data": { "menuUpdate": { "menu": { "id": "gid://shopify/Menu/442047006", "handle": "danielstuff-main-menu", "items": [ { "id": "gid://shopify/MenuItem/398712010", "title": "Electronics", "items": [] }, { "id": "gid://shopify/MenuItem/643685044", "title": "Furniture", "items": [ { "id": "gid://shopify/MenuItem/927352226", "title": "Updated Living Room" }, { "id": "gid://shopify/MenuItem/715378231", "title": "Kitchen" } ] }, { "id": "gid://shopify/MenuItem/698896745", "title": "Mega Sofa Sale", "items": [] } ] } } } }, "api_name": "admin", "minimum_api_version": "2024-07", "maximum_api_version": "unstable", "location": "/components/online_store/test/unit/graph_api/admin/mutations/menu_update_test.rb", "curl_example": "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation UpdateMenu($id: ID!, $title: String!, $handle: String!, $items: [MenuItemUpdateInput!]!) { menuUpdate(id: $id, title: $title, handle: $handle, items: $items) { menu { id handle items { id title items { id title } } } } }\",\n \"variables\": {\n \"id\": \"gid://shopify/Menu/442047006\",\n \"title\": \"updated menu\",\n \"handle\": \"danielstuff-main-menu\",\n \"items\": [\n {\n \"id\": \"gid://shopify/MenuItem/398712010\",\n \"title\": \"Electronics\",\n \"url\": \"collection/tables\",\n \"resourceId\": \"gid://shopify/Collection/71762467\",\n \"type\": \"COLLECTION\",\n \"items\": [\n \n ]\n },\n {\n \"id\": \"gid://shopify/MenuItem/643685044\",\n \"title\": \"Furniture\",\n \"url\": \"/collections/furniture\",\n \"resourceId\": \"gid://shopify/Collection/643685044\",\n \"type\": \"COLLECTION\",\n \"items\": [\n {\n \"id\": \"gid://shopify/MenuItem/927352226\",\n \"title\": \"Updated Living Room\",\n \"url\": \"/collections/living-room\",\n \"resourceId\": \"gid://shopify/Collection/927352226\",\n \"type\": \"COLLECTION\",\n \"items\": [\n {\n \"id\": \"gid://shopify/MenuItem/307741084\",\n \"title\": \"Sofa\",\n \"url\": \"/collections/sofa\",\n \"resourceId\": \"gid://shopify/Collection/307741084\",\n \"type\": \"COLLECTION\",\n \"items\": [\n \n ]\n },\n {\n \"id\": \"gid://shopify/MenuItem/375350346\",\n \"title\": \"Sound System\",\n \"url\": \"/collections/sound-system\",\n \"resourceId\": \"gid://shopify/Collection/375350346\",\n \"type\": \"COLLECTION\",\n \"items\": [\n \n ]\n },\n {\n \"id\": \"gid://shopify/MenuItem/837241978\",\n \"title\": \"Massage Chairs\",\n \"url\": \"/collections/massage%20chairs\",\n \"resourceId\": \"gid://shopify/Collection/837241978\",\n \"type\": \"COLLECTION\",\n \"items\": [\n \n ]\n },\n {\n \"id\": \"gid://shopify/MenuItem/960081962\",\n \"title\": \"Living Room Rugs\",\n \"url\": \"/collections/living%20room%20rugs\",\n \"resourceId\": \"gid://shopify/Collection/960081962\",\n \"type\": \"COLLECTION\",\n \"items\": [\n \n ]\n }\n ]\n },\n {\n \"id\": \"gid://shopify/MenuItem/715378231\",\n \"title\": \"Kitchen\",\n \"url\": \"/collections/kitchen\",\n \"resourceId\": \"gid://shopify/Collection/715378231\",\n \"type\": \"COLLECTION\",\n \"items\": [\n {\n \"id\": \"gid://shopify/MenuItem/108641250\",\n \"title\": \"Chairs\",\n \"url\": \"/collections/chairs\",\n \"resourceId\": \"gid://shopify/Collection/108641250\",\n \"type\": \"COLLECTION\",\n \"items\": [\n \n ]\n },\n {\n \"id\": \"gid://shopify/MenuItem/71762467\",\n \"title\": \"Tables\",\n \"url\": \"/collections/tables\",\n \"resourceId\": \"gid://shopify/Collection/71762467\",\n \"type\": \"COLLECTION\",\n \"items\": [\n \n ]\n },\n {\n \"id\": \"gid://shopify/MenuItem/826396515\",\n \"title\": \"Kitchen Rugs\",\n \"url\": \"/collections/kitchen%20rugs\",\n \"resourceId\": \"gid://shopify/Collection/826396515\",\n \"type\": \"COLLECTION\",\n \"items\": [\n \n ]\n }\n ]\n }\n ]\n },\n {\n \"id\": \"gid://shopify/MenuItem/698896745\",\n \"title\": \"Mega Sofa Sale\",\n \"url\": \"/collections/mega%20sale\",\n \"resourceId\": \"gid://shopify/Collection/307741084\",\n \"type\": \"COLLECTION\",\n \"items\": [\n \n ]\n }\n ]\n }\n}'\n", "remix_example": "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation UpdateMenu($id: ID!, $title: String!, $handle: String!, $items: [MenuItemUpdateInput!]!) {\n menuUpdate(id: $id, title: $title, handle: $handle, items: $items) {\n menu {\n id\n handle\n items {\n id\n title\n items {\n id\n title\n }\n }\n }\n }\n }`,\n {\n variables: {\n \"id\": \"gid://shopify/Menu/442047006\",\n \"title\": \"updated menu\",\n \"handle\": \"danielstuff-main-menu\",\n \"items\": [\n {\n \"id\": \"gid://shopify/MenuItem/398712010\",\n \"title\": \"Electronics\",\n \"url\": \"collection/tables\",\n \"resourceId\": \"gid://shopify/Collection/71762467\",\n \"type\": \"COLLECTION\",\n \"items\": [\n \n ]\n },\n {\n \"id\": \"gid://shopify/MenuItem/643685044\",\n \"title\": \"Furniture\",\n \"url\": \"/collections/furniture\",\n \"resourceId\": \"gid://shopify/Collection/643685044\",\n \"type\": \"COLLECTION\",\n \"items\": [\n {\n \"id\": \"gid://shopify/MenuItem/927352226\",\n \"title\": \"Updated Living Room\",\n \"url\": \"/collections/living-room\",\n \"resourceId\": \"gid://shopify/Collection/927352226\",\n \"type\": \"COLLECTION\",\n \"items\": [\n {\n \"id\": \"gid://shopify/MenuItem/307741084\",\n \"title\": \"Sofa\",\n \"url\": \"/collections/sofa\",\n \"resourceId\": \"gid://shopify/Collection/307741084\",\n \"type\": \"COLLECTION\",\n \"items\": [\n \n ]\n },\n {\n \"id\": \"gid://shopify/MenuItem/375350346\",\n \"title\": \"Sound System\",\n \"url\": \"/collections/sound-system\",\n \"resourceId\": \"gid://shopify/Collection/375350346\",\n \"type\": \"COLLECTION\",\n \"items\": [\n \n ]\n },\n {\n \"id\": \"gid://shopify/MenuItem/837241978\",\n \"title\": \"Massage Chairs\",\n \"url\": \"/collections/massage%20chairs\",\n \"resourceId\": \"gid://shopify/Collection/837241978\",\n \"type\": \"COLLECTION\",\n \"items\": [\n \n ]\n },\n {\n \"id\": \"gid://shopify/MenuItem/960081962\",\n \"title\": \"Living Room Rugs\",\n \"url\": \"/collections/living%20room%20rugs\",\n \"resourceId\": \"gid://shopify/Collection/960081962\",\n \"type\": \"COLLECTION\",\n \"items\": [\n \n ]\n }\n ]\n },\n {\n \"id\": \"gid://shopify/MenuItem/715378231\",\n \"title\": \"Kitchen\",\n \"url\": \"/collections/kitchen\",\n \"resourceId\": \"gid://shopify/Collection/715378231\",\n \"type\": \"COLLECTION\",\n \"items\": [\n {\n \"id\": \"gid://shopify/MenuItem/108641250\",\n \"title\": \"Chairs\",\n \"url\": \"/collections/chairs\",\n \"resourceId\": \"gid://shopify/Collection/108641250\",\n \"type\": \"COLLECTION\",\n \"items\": [\n \n ]\n },\n {\n \"id\": \"gid://shopify/MenuItem/71762467\",\n \"title\": \"Tables\",\n \"url\": \"/collections/tables\",\n \"resourceId\": \"gid://shopify/Collection/71762467\",\n \"type\": \"COLLECTION\",\n \"items\": [\n \n ]\n },\n {\n \"id\": \"gid://shopify/MenuItem/826396515\",\n \"title\": \"Kitchen Rugs\",\n \"url\": \"/collections/kitchen%20rugs\",\n \"resourceId\": \"gid://shopify/Collection/826396515\",\n \"type\": \"COLLECTION\",\n \"items\": [\n \n ]\n }\n ]\n }\n ]\n },\n {\n \"id\": \"gid://shopify/MenuItem/698896745\",\n \"title\": \"Mega Sofa Sale\",\n \"url\": \"/collections/mega%20sale\",\n \"resourceId\": \"gid://shopify/Collection/307741084\",\n \"type\": \"COLLECTION\",\n \"items\": [\n \n ]\n }\n ]\n },\n },\n);\n\nconst data = await response.json();\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 UpdateMenu($id: ID!, $title: String!, $handle: String!, $items: [MenuItemUpdateInput!]!) {\n menuUpdate(id: $id, title: $title, handle: $handle, items: $items) {\n menu {\n id\n handle\n items {\n id\n title\n items {\n id\n title\n }\n }\n }\n }\n }\nQUERY\n\nvariables = {\n \"id\": \"gid://shopify/Menu/442047006\",\n \"title\": \"updated menu\",\n \"handle\": \"danielstuff-main-menu\",\n \"items\": [{\"id\"=>\"gid://shopify/MenuItem/398712010\", \"title\"=>\"Electronics\", \"url\"=>\"collection/tables\", \"resourceId\"=>\"gid://shopify/Collection/71762467\", \"type\"=>\"COLLECTION\", \"items\"=>[]}, {\"id\"=>\"gid://shopify/MenuItem/643685044\", \"title\"=>\"Furniture\", \"url\"=>\"/collections/furniture\", \"resourceId\"=>\"gid://shopify/Collection/643685044\", \"type\"=>\"COLLECTION\", \"items\"=>[{\"id\"=>\"gid://shopify/MenuItem/927352226\", \"title\"=>\"Updated Living Room\", \"url\"=>\"/collections/living-room\", \"resourceId\"=>\"gid://shopify/Collection/927352226\", \"type\"=>\"COLLECTION\", \"items\"=>[{\"id\"=>\"gid://shopify/MenuItem/307741084\", \"title\"=>\"Sofa\", \"url\"=>\"/collections/sofa\", \"resourceId\"=>\"gid://shopify/Collection/307741084\", \"type\"=>\"COLLECTION\", \"items\"=>[]}, {\"id\"=>\"gid://shopify/MenuItem/375350346\", \"title\"=>\"Sound System\", \"url\"=>\"/collections/sound-system\", \"resourceId\"=>\"gid://shopify/Collection/375350346\", \"type\"=>\"COLLECTION\", \"items\"=>[]}, {\"id\"=>\"gid://shopify/MenuItem/837241978\", \"title\"=>\"Massage Chairs\", \"url\"=>\"/collections/massage%20chairs\", \"resourceId\"=>\"gid://shopify/Collection/837241978\", \"type\"=>\"COLLECTION\", \"items\"=>[]}, {\"id\"=>\"gid://shopify/MenuItem/960081962\", \"title\"=>\"Living Room Rugs\", \"url\"=>\"/collections/living%20room%20rugs\", \"resourceId\"=>\"gid://shopify/Collection/960081962\", \"type\"=>\"COLLECTION\", \"items\"=>[]}]}, {\"id\"=>\"gid://shopify/MenuItem/715378231\", \"title\"=>\"Kitchen\", \"url\"=>\"/collections/kitchen\", \"resourceId\"=>\"gid://shopify/Collection/715378231\", \"type\"=>\"COLLECTION\", \"items\"=>[{\"id\"=>\"gid://shopify/MenuItem/108641250\", \"title\"=>\"Chairs\", \"url\"=>\"/collections/chairs\", \"resourceId\"=>\"gid://shopify/Collection/108641250\", \"type\"=>\"COLLECTION\", \"items\"=>[]}, {\"id\"=>\"gid://shopify/MenuItem/71762467\", \"title\"=>\"Tables\", \"url\"=>\"/collections/tables\", \"resourceId\"=>\"gid://shopify/Collection/71762467\", \"type\"=>\"COLLECTION\", \"items\"=>[]}, {\"id\"=>\"gid://shopify/MenuItem/826396515\", \"title\"=>\"Kitchen Rugs\", \"url\"=>\"/collections/kitchen%20rugs\", \"resourceId\"=>\"gid://shopify/Collection/826396515\", \"type\"=>\"COLLECTION\", \"items\"=>[]}]}]}, {\"id\"=>\"gid://shopify/MenuItem/698896745\", \"title\"=>\"Mega Sofa Sale\", \"url\"=>\"/collections/mega%20sale\", \"resourceId\"=>\"gid://shopify/Collection/307741084\", \"type\"=>\"COLLECTION\", \"items\"=>[]}]\n}\n\nresponse = client.query(query: query, variables: variables)\n", "node_example": "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation UpdateMenu($id: ID!, $title: String!, $handle: String!, $items: [MenuItemUpdateInput!]!) {\n menuUpdate(id: $id, title: $title, handle: $handle, items: $items) {\n menu {\n id\n handle\n items {\n id\n title\n items {\n id\n title\n }\n }\n }\n }\n }`,\n \"variables\": {\n \"id\": \"gid://shopify/Menu/442047006\",\n \"title\": \"updated menu\",\n \"handle\": \"danielstuff-main-menu\",\n \"items\": [\n {\n \"id\": \"gid://shopify/MenuItem/398712010\",\n \"title\": \"Electronics\",\n \"url\": \"collection/tables\",\n \"resourceId\": \"gid://shopify/Collection/71762467\",\n \"type\": \"COLLECTION\",\n \"items\": [\n \n ]\n },\n {\n \"id\": \"gid://shopify/MenuItem/643685044\",\n \"title\": \"Furniture\",\n \"url\": \"/collections/furniture\",\n \"resourceId\": \"gid://shopify/Collection/643685044\",\n \"type\": \"COLLECTION\",\n \"items\": [\n {\n \"id\": \"gid://shopify/MenuItem/927352226\",\n \"title\": \"Updated Living Room\",\n \"url\": \"/collections/living-room\",\n \"resourceId\": \"gid://shopify/Collection/927352226\",\n \"type\": \"COLLECTION\",\n \"items\": [\n {\n \"id\": \"gid://shopify/MenuItem/307741084\",\n \"title\": \"Sofa\",\n \"url\": \"/collections/sofa\",\n \"resourceId\": \"gid://shopify/Collection/307741084\",\n \"type\": \"COLLECTION\",\n \"items\": [\n \n ]\n },\n {\n \"id\": \"gid://shopify/MenuItem/375350346\",\n \"title\": \"Sound System\",\n \"url\": \"/collections/sound-system\",\n \"resourceId\": \"gid://shopify/Collection/375350346\",\n \"type\": \"COLLECTION\",\n \"items\": [\n \n ]\n },\n {\n \"id\": \"gid://shopify/MenuItem/837241978\",\n \"title\": \"Massage Chairs\",\n \"url\": \"/collections/massage%20chairs\",\n \"resourceId\": \"gid://shopify/Collection/837241978\",\n \"type\": \"COLLECTION\",\n \"items\": [\n \n ]\n },\n {\n \"id\": \"gid://shopify/MenuItem/960081962\",\n \"title\": \"Living Room Rugs\",\n \"url\": \"/collections/living%20room%20rugs\",\n \"resourceId\": \"gid://shopify/Collection/960081962\",\n \"type\": \"COLLECTION\",\n \"items\": [\n \n ]\n }\n ]\n },\n {\n \"id\": \"gid://shopify/MenuItem/715378231\",\n \"title\": \"Kitchen\",\n \"url\": \"/collections/kitchen\",\n \"resourceId\": \"gid://shopify/Collection/715378231\",\n \"type\": \"COLLECTION\",\n \"items\": [\n {\n \"id\": \"gid://shopify/MenuItem/108641250\",\n \"title\": \"Chairs\",\n \"url\": \"/collections/chairs\",\n \"resourceId\": \"gid://shopify/Collection/108641250\",\n \"type\": \"COLLECTION\",\n \"items\": [\n \n ]\n },\n {\n \"id\": \"gid://shopify/MenuItem/71762467\",\n \"title\": \"Tables\",\n \"url\": \"/collections/tables\",\n \"resourceId\": \"gid://shopify/Collection/71762467\",\n \"type\": \"COLLECTION\",\n \"items\": [\n \n ]\n },\n {\n \"id\": \"gid://shopify/MenuItem/826396515\",\n \"title\": \"Kitchen Rugs\",\n \"url\": \"/collections/kitchen%20rugs\",\n \"resourceId\": \"gid://shopify/Collection/826396515\",\n \"type\": \"COLLECTION\",\n \"items\": [\n \n ]\n }\n ]\n }\n ]\n },\n {\n \"id\": \"gid://shopify/MenuItem/698896745\",\n \"title\": \"Mega Sofa Sale\",\n \"url\": \"/collections/mega%20sale\",\n \"resourceId\": \"gid://shopify/Collection/307741084\",\n \"type\": \"COLLECTION\",\n \"items\": [\n \n ]\n }\n ]\n },\n },\n});\n", "php_example": "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<QUERY\n mutation UpdateMenu($id: ID!, $title: String!, $handle: String!, $items: [MenuItemUpdateInput!]!) {\n menuUpdate(id: $id, title: $title, handle: $handle, items: $items) {\n menu {\n id\n handle\n items {\n id\n title\n items {\n id\n title\n }\n }\n }\n }\n }\nQUERY;\n\n$variables = [\n \"id\" => \"gid://shopify/Menu/442047006\",\n \"title\" => \"updated menu\",\n \"handle\" => \"danielstuff-main-menu\",\n \"items\" => [{\"id\"=>\"gid://shopify/MenuItem/398712010\", \"title\"=>\"Electronics\", \"url\"=>\"collection/tables\", \"resourceId\"=>\"gid://shopify/Collection/71762467\", \"type\"=>\"COLLECTION\", \"items\"=>[]}, {\"id\"=>\"gid://shopify/MenuItem/643685044\", \"title\"=>\"Furniture\", \"url\"=>\"/collections/furniture\", \"resourceId\"=>\"gid://shopify/Collection/643685044\", \"type\"=>\"COLLECTION\", \"items\"=>[{\"id\"=>\"gid://shopify/MenuItem/927352226\", \"title\"=>\"Updated Living Room\", \"url\"=>\"/collections/living-room\", \"resourceId\"=>\"gid://shopify/Collection/927352226\", \"type\"=>\"COLLECTION\", \"items\"=>[{\"id\"=>\"gid://shopify/MenuItem/307741084\", \"title\"=>\"Sofa\", \"url\"=>\"/collections/sofa\", \"resourceId\"=>\"gid://shopify/Collection/307741084\", \"type\"=>\"COLLECTION\", \"items\"=>[]}, {\"id\"=>\"gid://shopify/MenuItem/375350346\", \"title\"=>\"Sound System\", \"url\"=>\"/collections/sound-system\", \"resourceId\"=>\"gid://shopify/Collection/375350346\", \"type\"=>\"COLLECTION\", \"items\"=>[]}, {\"id\"=>\"gid://shopify/MenuItem/837241978\", \"title\"=>\"Massage Chairs\", \"url\"=>\"/collections/massage%20chairs\", \"resourceId\"=>\"gid://shopify/Collection/837241978\", \"type\"=>\"COLLECTION\", \"items\"=>[]}, {\"id\"=>\"gid://shopify/MenuItem/960081962\", \"title\"=>\"Living Room Rugs\", \"url\"=>\"/collections/living%20room%20rugs\", \"resourceId\"=>\"gid://shopify/Collection/960081962\", \"type\"=>\"COLLECTION\", \"items\"=>[]}]}, {\"id\"=>\"gid://shopify/MenuItem/715378231\", \"title\"=>\"Kitchen\", \"url\"=>\"/collections/kitchen\", \"resourceId\"=>\"gid://shopify/Collection/715378231\", \"type\"=>\"COLLECTION\", \"items\"=>[{\"id\"=>\"gid://shopify/MenuItem/108641250\", \"title\"=>\"Chairs\", \"url\"=>\"/collections/chairs\", \"resourceId\"=>\"gid://shopify/Collection/108641250\", \"type\"=>\"COLLECTION\", \"items\"=>[]}, {\"id\"=>\"gid://shopify/MenuItem/71762467\", \"title\"=>\"Tables\", \"url\"=>\"/collections/tables\", \"resourceId\"=>\"gid://shopify/Collection/71762467\", \"type\"=>\"COLLECTION\", \"items\"=>[]}, {\"id\"=>\"gid://shopify/MenuItem/826396515\", \"title\"=>\"Kitchen Rugs\", \"url\"=>\"/collections/kitchen%20rugs\", \"resourceId\"=>\"gid://shopify/Collection/826396515\", \"type\"=>\"COLLECTION\", \"items\"=>[]}]}]}, {\"id\"=>\"gid://shopify/MenuItem/698896745\", \"title\"=>\"Mega Sofa Sale\", \"url\"=>\"/collections/mega%20sale\", \"resourceId\"=>\"gid://shopify/Collection/307741084\", \"type\"=>\"COLLECTION\", \"items\"=>[]}],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" }, "titleStringKey": "variables", "inputVariableEntries": [ { "arg": { "name": "id", "description": "ID of the menu to be updated.", "type": { "kind": "SCALAR", "name": "ID", "list": false, "non_null": true }, "defaultValue": null, "typeSignature": "ID!", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "id", "argValue": " \"gid://shopify/Menu/442047006\"", "typeKind": "MUTATION" }, { "arg": { "name": "title", "description": "The menu's title.", "type": { "kind": "SCALAR", "name": "String", "list": false, "non_null": true }, "defaultValue": null, "typeSignature": "String!", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "title", "argValue": " \"updated menu\"", "typeKind": "MUTATION" }, { "arg": { "name": "handle", "description": "The menus's handle.", "type": { "kind": "SCALAR", "name": "String", "list": false, "non_null": false }, "defaultValue": null, "typeSignature": "String", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "handle", "argValue": " \"danielstuff-main-menu\"", "typeKind": "MUTATION" }, { "arg": { "name": "items", "description": "List of the menus' items.", "type": { "kind": "INPUT_OBJECT", "name": "MenuItemUpdateInput", "list": true, "non_null": true }, "defaultValue": null, "typeSignature": "[MenuItemUpdateInput!]!", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "items", "argValue": " [{\"id\":\"gid://shopify/MenuItem/398712010\",\"title\":\"Electronics\",\"url\":\"collection/tables\",\"resourceId\":\"gid://shopify/Collection/71762467\",\"type\":\"COLLECTION\",\"items\":[]},{\"id\":\"gid://shopify/MenuItem/643685044\",\"title\":\"Furniture\",\"url\":\"/collections/furniture\",\"resourceId\":\"gid://shopify/Collection/643685044\",\"type\":\"COLLECTION\",\"items\":[{\"id\":\"gid://shopify/MenuItem/927352226\",\"title\":\"Updated Living Room\",\"url\":\"/collections/living-room\",\"resourceId\":\"gid://shopify/Collection/927352226\",\"type\":\"COLLECTION\",\"items\":[{\"id\":\"gid://shopify/MenuItem/307741084\",\"title\":\"Sofa\",\"url\":\"/collections/sofa\",\"resourceId\":\"gid://shopify/Collection/307741084\",\"type\":\"COLLECTION\",\"items\":[]},{\"id\":\"gid://shopify/MenuItem/375350346\",\"title\":\"Sound System\",\"url\":\"/collections/sound-system\",\"resourceId\":\"gid://shopify/Collection/375350346\",\"type\":\"COLLECTION\",\"items\":[]},{\"id\":\"gid://shopify/MenuItem/837241978\",\"title\":\"Massage Chairs\",\"url\":\"/collections/massage%20chairs\",\"resourceId\":\"gid://shopify/Collection/837241978\",\"type\":\"COLLECTION\",\"items\":[]},{\"id\":\"gid://shopify/MenuItem/960081962\",\"title\":\"Living Room Rugs\",\"url\":\"/collections/living%20room%20rugs\",\"resourceId\":\"gid://shopify/Collection/960081962\",\"type\":\"COLLECTION\",\"items\":[]}]},{\"id\":\"gid://shopify/MenuItem/715378231\",\"title\":\"Kitchen\",\"url\":\"/collections/kitchen\",\"resourceId\":\"gid://shopify/Collection/715378231\",\"type\":\"COLLECTION\",\"items\":[{\"id\":\"gid://shopify/MenuItem/108641250\",\"title\":\"Chairs\",\"url\":\"/collections/chairs\",\"resourceId\":\"gid://shopify/Collection/108641250\",\"type\":\"COLLECTION\",\"items\":[]},{\"id\":\"gid://shopify/MenuItem/71762467\",\"title\":\"Tables\",\"url\":\"/collections/tables\",\"resourceId\":\"gid://shopify/Collection/71762467\",\"type\":\"COLLECTION\",\"items\":[]},{\"id\":\"gid://shopify/MenuItem/826396515\",\"title\":\"Kitchen Rugs\",\"url\":\"/collections/kitchen%20rugs\",\"resourceId\":\"gid://shopify/Collection/826396515\",\"type\":\"COLLECTION\",\"items\":[]}]}]},{\"id\":\"gid://shopify/MenuItem/698896745\",\"title\":\"Mega Sofa Sale\",\"url\":\"/collections/mega%20sale\",\"resourceId\":\"gid://shopify/Collection/307741084\",\"type\":\"COLLECTION\",\"items\":[]}]", "typeKind": "MUTATION" } ] } ]