valu-digital / wp-graphql-polylang

WPGraphQL Polylang Extension for WordPress
https://packagist.org/packages/valu/wp-graphql-polylang
GNU General Public License v2.0
129 stars 22 forks source link

Querying menuItems with location and language does not work with wp-graphql 1.26.0 and wp-graphql-polylang v0.6.0 #89

Open judas-christ opened 5 months ago

judas-christ commented 5 months ago

I accidentally updated wp-graphql from 1.25.0 to 1.26.0 and discovered that querying menuItems using location and language does not work anymore on v0.6.0. Downgrading to 1.25.0 works.

Reproduce by creating a site with a couple of languages and a menu. Open GraphiQL and run this query, where MAIN_MENU is the menu location and EN is the non-default language:

menuItems(where: { location: MAIN_MENU, language: EN }) {
  nodes {
    locations
  }
}

This will return a correct result in 1.25.0 but an incorrect one on 1.26.0.