Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

ContactSign Up
Community Plugin
View plugin on GitHub

gatsby-source-goodreads

Source plugin for pulling your read books into Gatsby from Goodreads API.

How to use

// In your gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: "gatsby-source-goodreads",
      options: {
        developerKey: "IAmDeveloperKey",
        goodReadsUserId: "IAmGoodreadsUserId",
        userShelf: "to-read" //optional
      }
    }
  ],
}

Plugin options

  • developerKey: Use your Goodreads developer API key
  • goodReadsUserId: The Goodreads user ID of the user to get data for.
  • userShelf: OPTIONAL. read, currently-reading, to-read, etc.

How to query your Goodread data using GraphQL

Below is a sample query for fetching the shelf’s books.

query goodRead {
  goodreadsShelf {
    id
    shelfName
    reviews {
      reviewID
      rating
      votes
      spoilerFlag
      dateAdded
      dateUpdated
      body
      book {
        bookID
        isbn
        isbn13
        textReviewsCount
        uri
        link
        title
        titleWithoutSeries
        imageUrl
        smallImageUrl
        largeImageUrl
        description
      }
    }
  }
}
© 2023 Gatsby, Inc.