Skip to content

Gatsby source plugin for pulling in Yotpo reviews

Notifications You must be signed in to change notification settings

superbigco/gatsby-source-yotpo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gatsby-source-yotpo

This plugin allows you to access your Yotpo reviews and ratings through Gatsby's GraphQL queries.

Usage

yarn add gatsby-source-yotpo

Add the plugin to your gatsby-config.js using the "App Key" and "Secret Key" credentials from your store settings in Yotpo:

plugins: [
  {
    resolve: "gatsby-source-yotpo",
    options: {
      appKey: "YOTPO_APP_KEY",
      appSecret: "YOTPO_SECRET_KEY",
    },
  }
]

Querying for Data

In your page queries, you can query for data like so:

{
  reviews: allYotpoProductReview {
    nodes {
      productIdentifier
      score
      sentiment
      votesUp
      votesDown
      title
      name
      email
      reviewerType
      content
    }
  }
  
  ratings: allYotpoProductBottomline {
    nodes {
      productIdentifier
      totalReviews
      score
    }
  }
}

For a full list of fields and descriptions of each, see the Yotpo documentation.

About

Gatsby source plugin for pulling in Yotpo reviews

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%