Created
September 10, 2018 17:54
-
-
Save glennreyes/1c2f7cf4922bf255641575e57f48ab18 to your computer and use it in GitHub Desktop.
GraphQL import
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
import { gql } from 'apollo-tag'; | |
const ArticleQuery = gql` | |
query ArticleQuery { | |
articles { | |
id | |
title | |
} | |
} | |
`; | |
// Use <ArticleQuery /> as a render prop component |
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
import ArticleQuery from './ArticleQuery.graphql' | |
// <ArticleQuery /> is a render prop component |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment