Created
September 14, 2017 10:38
-
-
Save younesmln/f657c9d9934744df9fc04fd9cf16cdaa 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
import React, { Component } from 'react'; | |
import PropTypes from 'prop-types'; | |
import { graphql } from 'react-apollo'; | |
import gql from 'graphql-tag'; | |
class Profile extends Component { ... } | |
// We use the gql tag to parse our query string into a query document | |
const CurrentUserForLayout = gql` | |
query CurrentUserForLayout { | |
currentUser { | |
login | |
avatar_url | |
} | |
} | |
`; | |
const ProfileWithData = graphql(CurrentUserForLayout)(Profile); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment