Skip to main content
Community Plugin
View plugin on GitHub
See starters using this

Gatsby Source for Yelp

Source plugin for fetching data into Gatsby from Yelp REST API to your Gatsby website.

Install

npm install --save @leomanlapera/gatsby-source-yelp
yarn add @leomanlapera/gatsby-source-yelp

How to use

// In your gatsby-config.js
plugins: [
  {
    resolve: `@leomanlapera/gatsby-source-yelp`,
    options: {
      id: <business-id>,
      apiKey: <yelp-api-key>
    }
  },
]

How to query

You can query the nodes created from Yelp with the following:

{
  allYelpBusinessReview {
    edges {
      node {
        id
        rating
        text
        time_created
        url
        user {
          name
        }
      }
    }
  }
}

and you can filter specific node using this:

{
  yelpBusinessReview(id: {eq: ""}) {
    id
    rating
    text
    url
  }
}

Currently supporting

  • Business Reviews
  • Business Details