Gatsby filter with wordpress wpml langauge not working

Gatsby filter with wordpress wpml langauge not working


0

I have a wordpress headless setup to work with gatsby static site genetator. The data is coming correclty when queried from wordpress console.

{
    categories (where : {language: "fr"}){
    nodes {
      id,
      databaseId,
      name,
      uri
    }
  }
}

Same data is not coming when queried from gatsby graphql query:

{
  allWpCategory (filter : {language : {code : {eq : "fr"}}}){
    nodes {
      id,
      name,
      uri,
      databaseId,
      languageCode
    }
  }
}

However the en content appears when filter is changed to "en":

{
  allWpCategory (filter : {language : {code : {eq : "en"}}}){
    nodes {
      id,
      name,
      uri,
      databaseId,
      languageCode
    }
  }
}

I have verified all wpml configurations and the languages are properly configured and associated with posts. Also categories are having FR version content setup.


Load 5 more related questions


Show fewer related questions

0



Leave a Reply

Your email address will not be published. Required fields are marked *