Skip to content

Source plugin for pulling data into Gatsby from node-hnapi, an unofficial API for Hacker News.

License

Notifications You must be signed in to change notification settings

yinkakun/gatsby-source-hnapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gatsby-source-hnapi

Source plugin for pulling data into Gatsby from node-hnapi, an unofficial API for Hacker News.

Install

npm install gatsby-source-hnapi

#or

yarn add gatsby-source-hnapi

How to use

// In your gatsby-config.js
plugins: [`gatsby-source-hnapi`];

How To Query

Returns 30 results for allHnTopstories, allHnLateststories, allHnBeststories, allHnAsks, allHnShow, and allHnJobs.

query MyQuery {
  allHnLatestStories {
    nodes {
      title
      url
      points
      user
      id
      time_ago
      time
      domain
      comments
    }
  }
}

Credits

This plugin is wrapper around node-hnapi

About

Source plugin for pulling data into Gatsby from node-hnapi, an unofficial API for Hacker News.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published