Source plugin for pulling data into Gatsby from node-hnapi, an unofficial API for Hacker News.
npm install gatsby-source-hnapi
#or
yarn add gatsby-source-hnapi
// In your gatsby-config.js
plugins: [`gatsby-source-hnapi`];
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
}
}
}
This plugin is wrapper around node-hnapi