WPGraphQL

For WordPress sites using WPGraphQL, the BeyondWords project ID and content ID are available as fields at the following locations:

  • beyondwords.projectId

  • beyondwords.contentId

You can use the values of these fields to embed an audio player using one of our Player SDKs.

Sample GraphQL Query

Retrieve the post title and the BeyondWords data for your posts.

Query

query MyQuery {
  posts {
    nodes {
      title
      beyondwords {
        projectId
        contentId
      }
    }
  }
}

Example response

{
  "data": {
    "posts": {
      "nodes": [
        {
          "title": "A post",
          "beyondwords": {
            "projectId": 1234,
            "contentId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
          }
        },
        {
          "title": "Another post",
          "beyondwords": {
            "projectId": 1234,
            "contentId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
          }
        }
      ]
    }
  }
}

For legacy support we provide a 3rd field beyondwords.podcastId with the same value as contentId. If you are currently using podcastId then please update your application to read contentId instead. The podcastId field is deprecated and it will be removed in plugin version 5.0.

Last updated