Created
July 30, 2019 01:26
-
-
Save matlc/5b32c9fa9df1cf5fdb13846e55ac36c6 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
// `blog-post.js` | |
export const query = graphql` | |
fragment postFields on PostsJson { | |
slug | |
title | |
content | |
publishDate(formatString: "MMMM DD, YYYY") | |
tags | |
} | |
fragment authorFields on AuthorsJson { | |
slug | |
name | |
biography | |
} | |
query ($id: String!) { | |
post: postsJson(id: {eq: $id}) { | |
...postFields | |
author { | |
...authorFields | |
} | |
} | |
} | |
` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment