Skip to content

Instantly share code, notes, and snippets.

@dbayarchyk
Last active September 18, 2019 14:00
Show Gist options
  • Save dbayarchyk/c86058829f80a1be79a845ebcc7d1d4c to your computer and use it in GitHub Desktop.
Save dbayarchyk/c86058829f80a1be79a845ebcc7d1d4c to your computer and use it in GitHub Desktop.
GraphQL fragment-based approach to building your components - Comment/fragments
import gql from 'graphql-tag';
import * as Comment from 'Comment/fragments';
export const comments = gql`
fragment Comments_comments on Post {
comments {
id
...Comment_comment
}
}
${Comment.comment}
`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment