Last active
June 16, 2018 15:28
-
-
Save dance2die/6d6b4234050801d4c90b05ea64fd5396 to your computer and use it in GitHub Desktop.
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
// imports and stuff ... | |
... | |
// "data" is passed by Gatsby with result of "StoriesQuery" | |
const IndexPage = ({ data }) => ( | |
<Stories stories={data.allTopStories.edges} title="Top Stories" /> | |
) | |
export default IndexPage | |
export const query = graphql` | |
query StoriesQuery { | |
allTopStories { | |
edges { | |
node { | |
id | |
storyId | |
item { | |
id | |
title | |
score | |
by | |
time | |
type | |
url | |
} | |
} | |
} | |
} | |
} | |
` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment