1

I'm trying to craft a GraphQL query to search posts by title and content. However, it seems my query only searches on title.

I'm using the source WordPress Plugin with this query:

query Posts {
  allPage: allWordPressPost(regex:".*hello.*") {
    edges {
      node {
        title
        path
        content
      }
    }
  }
}

Any ideas? Is this even possible with Gridsome / source-wordpress (I know these are pretty immature)?

Vikrant Kashyap
  • 6,398
  • 3
  • 32
  • 52
icats
  • 959
  • 3
  • 13
  • 24
  • Can you show your GraphQL playground? The playground should show you exactly what you can query and the data type of that piece of data. I would expect that if it was possible the playground would show it. I’m sure it is possible though. I am interested to see an answer to this, but I have none. Not sure if this will help, but take a look. https://stackoverflow.com/questions/58635769/gridsome-wordpress-source-plugin-how-to-add-archive-routes-by-month-and-year – ETHan Dec 17 '19 at 17:58

0 Answers0