0

In a NextJS project, I am pulling posts from WordPress using WPGraphQL plugin. I am not getting the excerpts manually added to the posts.

Here is my code:

query AllPosts {
  posts(first: 20) {
    edges {
      node {
        title
        excerpt
        slug
        date
      }
    }
  }
}

I am getting the following result:

{
  "data": {
    "posts": {
      "edges": [
        {
          "node": {
            "title": "This is a test",
            "excerpt": "<a class=\"more-link\" href=\"https://www.examplesite.com/this-is-a-test/\"> Continue Reading </a>",
            "slug": "this-is-a-test",
            "date": "2022-11-28T09:29:06"
          }
        }
      ]
    }
  },
  "extensions": {
    "debug": [
      {
        "type": "DEBUG_LOGS_INACTIVE",
        "message": "GraphQL Debug logging is not active. To see debug logs, GRAPHQL_DEBUG must be enabled."
      }
    ]
  }
}

The excerpt I entered was "This is a test excerpt". I am expecting the excerpt as I have entered.

Ben Jonson
  • 565
  • 7
  • 22

0 Answers0