Skip to content

Instantly share code, notes, and snippets.

@glennreyes
Created September 10, 2018 17:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glennreyes/1c2f7cf4922bf255641575e57f48ab18 to your computer and use it in GitHub Desktop.
Save glennreyes/1c2f7cf4922bf255641575e57f48ab18 to your computer and use it in GitHub Desktop.
GraphQL import
import { gql } from 'apollo-tag';
const ArticleQuery = gql`
query ArticleQuery {
articles {
id
title
}
}
`;
// Use <ArticleQuery /> as a render prop component
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