GraphQL mutation: MenuCreate: resourceId: for "FRONTPAGE"

Hey @Jordan_Khalil!

I tested this in my own store and can confirm that FRONTPAGE menu items don’t need a resourceId. When creating a menu item with type FRONTPAGE, the resourceId should be omitted entirely, not set as an empty string.

Here’s a working example of the mutation:

mutation MenuCreate {
  menuCreate(
    title: "TestMenu"
    items: { title: "Home", type: FRONTPAGE }
    handle: "TestMenu"
  ) {
    menu {
      handle
      id
      title
      items(limit: 10) {
        id
        resourceId
        title
        type
        url
      }
    }
  }
}

This returns:

{
  "data": {
    "menuCreate": {
      "menu": {
        "handle": "testmenu",
        "id": "gid://shopify/Menu/297795977238",
        "title": "TestMenu",
        "items": [
          {
            "id": "gid://shopify/MenuItem/739719020566",
            "resourceId": null,
            "tags": [],
            "title": "Home",
            "type": "FRONTPAGE",
            "url": "/"
          }
        ]
      }
    }
  }
}

The url parameter is automatically set to “/” for FRONTPAGE items, so you don’t need to specify it in your input either. For your COLLECTIONS type, if your menu is going to all collections it will be the same as above, but if you’re linking to individual collections then you add the resourceID of the collection.

Hope that help!