Query x-data with guillotine

Is it possible to query x-data with guillotine, e.g. with queryDSL.

I tried with the following code-snippet :

{
  guillotine {
    get(key: "/osde") {
      displayName
      x {
        de_osde_app_be {
          menu_item {
            menuItem
          }
        }
      }
    }
    queryDsl(
      query: {term: {field: "x.de_osde_app_be.menu_item.menuItem", value: {boolean: true}}}
    ) {
      displayName
    }
  }
}

This is the response :frowning:

{
  "data": {
    "guillotine": {
      "get": {
        "displayName": "Outsourcing Portal",
        "x": {
          "de_osde_app_be": {
            "menu_item": {
              "menuItem": "true"
            }
          }
        }
      },
      "queryDsl": []
    }
  }
}

There should be no difference running queries via Guillotine vs JS API.
@asi any ideas what is wrong here?

I think you must use x.de-osde-app-be.menu-item.menuItem instead of x.de_osde_app_be.menu_item.menuItem in your query.

1 Like

@asi you are absolutely right :slight_smile:

Ah, the property name is actually ‘menu-item’, but autoconverted to menu_item for GraphQL compatibility…

1 Like