// 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