Skip to content

matepaiva/yarpp-wpgraphql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YARPP WPGraphQL

Description

Creates a relatedPosts field in Post type with wp-graphql. You must have installed wp-graphql and YARPP.

Installation

  1. Install the plugin wp-graphql
  2. Install the plugin yarpp (Yet Another Related Posts Plugin)
  3. Configure them following their instructions.
  4. Install this plugin
  5. Activate the plugin through the 'Plugins' menu in WordPress
  6. Use it with wp-graphql. The field "relatedPosts" will be available within the Post type in GraphQL schema.

Example

{
  post(id: 235912, idType: DATABASE_ID) {
    title
    relatedPosts(where: { limit: 1 }) {
      nodes {
        title
        slug
      }
    }
  }
}

Changelog

About

WP plugin. Creates a relatedPosts field in Post type with wp-graphql. You must have installed wp-graphql and YARPP.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages