@leomanlapera/gatsby-source-yelp

1.0.2 • Public • Published

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

Package Sidebar

Install

npm i @leomanlapera/gatsby-source-yelp

Weekly Downloads

6

Version

1.0.2

License

MIT

Unpacked Size

3.82 kB

Total Files

4

Last publish

Collaborators

  • leomanlapera