Skip to content

palmiak/smartcrawl-wpgraphql

Repository files navigation

WPGraphQL Extension for SmartCrawl

Requirements

To use this plugin you'll need:

Usage

For posts and post types:

query GET_POSTS {
  posts {
    edges {
      node {
        id
        title
        date
       	smartcrawl_seo{
          title
          metaDesc
          metaRobotsNoindex
          metaRobotsNofollow
          opengraphTitle
          opengraphDescription
          canonical
          opengraphImage {
            sourceUrl
          }
          twitterTitle
          twitterDescription
          twitterImage {
            sourceUrl
          }
          twitterCard
          focusKeywords
        }
      }
    }
  }
}

For taxonomies:

query GET_CATEGORIES {
  categories {
    edges {
      node {
       smartcrawl_seo{
          title
          metaDesc
          metaRobotsNoindex
          metaRobotsNofollow
          opengraphTitle
          opengraphDescription
          canonical
          opengraphImage {
            sourceUrl
          }
          twitterTitle
          twitterDescription
          twitterImage {
            sourceUrl
          }
          twitterCard
          focusKeywords
        }
      }
    }
  }
}

Contributions

Big thanks to Ashley Hitchcock for inspiration.