MenuLink field external always returns false

Created on 21 February 2023, almost 2 years ago
Updated 10 March 2023, over 1 year ago

Example:

"subtree": [
    {
        "link": {
            "label": "Arrivals",
            "description": null,
            "url": {
                "path": "https://www.../arrivals/"
            },
            "content": {
                "external": false
            }
        }
    },
...
🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇳🇱Netherlands Ronald van Belzen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Ronald van Belzen
  • 🇨🇭Switzerland dulnan

    I've created a menu link entity with an external URL and inspected it when the external field is resolved:

    The value is actually FALSE in the MenuLinkContent entity. So this seems to be a core bug.

    As a workaround you can get the same information by accessing uri in the link field and checking the __typename of the URL, which will be ExternalUrl.

    query {
      entityById(entityType: MENU, id: "test") {
        ... on Menu {
          links {
            link {
              content {
                ... on MenuLinkContentTest {
                  label
                  link {
                    uri {
                      __typename
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
    
  • 🇨🇭Switzerland ayalon

    Available in the 1.0.0-beta5 release.

  • Status changed to Fixed over 1 year ago
Production build 0.71.5 2024