Last active
October 1, 2019 10:06
-
-
Save dbayarchyk/38172f2b169cd48d45ea25889a59c214 to your computer and use it in GitHub Desktop.
GraphQL fragment-based approach to building your components - postPageQuery.ts
This file contains hidden or 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
import gql from 'graphql-tag'; | |
import * as Post from 'Post/fragments'; | |
import * as Comments from 'Comments/fragments'; | |
export default gql` | |
query PostPageQuery($id: ID!) { | |
post(id: $id) { | |
...Post_post | |
...Comments_comments | |
} | |
} | |
${Post.post} | |
${Comments.comments} | |
`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment