-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[1.0] refactor node structure to hide internal fields (#960)
* Initial refactor done * Remove unused code * Some fixes * Bump site version number cause it's getting better and stuff * Fix source-drupal plugin * Add basic documentation for node interface and hacker news source plugin
- Loading branch information
1 parent
d7e228b
commit daaa22c
Showing
30 changed files
with
529 additions
and
363 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# gatsby-source-hacker-news | ||
|
||
Source plugin for pulling data into Gatsby from the [Hacker News | ||
API](https://github.com/HackerNews/API) | ||
|
||
## Install | ||
|
||
`npm install --save gatsby-source-hacker-news` | ||
|
||
## How to use | ||
|
||
```javascript | ||
// In your gatsby-config.js | ||
plugins: [ | ||
`gatsby-source-hacker-news`, | ||
] | ||
``` | ||
|
||
## How to query | ||
|
||
You can query nodes created from Hacker News like the following: | ||
|
||
```graphql | ||
query StoriesQuery { | ||
allHnStory(sortBy: {fields: [order]}) { | ||
edges { | ||
node { | ||
id | ||
title | ||
score | ||
order | ||
domain | ||
url | ||
by | ||
descendants | ||
timeISO(fromNow: true) | ||
children { | ||
id | ||
text | ||
timeISO(fromNow: true) | ||
by | ||
} | ||
} | ||
} | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.