import gql from 'graphql-tag' import { graphql, compose } from 'react-apollo' const GetUserEmail = gql` query GetUserEmail() { getUserEmail() { } }` const withAppSyncUserEmail = compose( graphql(GetUserEmail, { name: 'getUserEmail', options: (ownProps) => ({ fetchPolicy: 'cache-and-network', variables: { } }), props: (props) => { if (props.getUserEmail.error) console.log(props.getUserEmail.error) return props } }) ) export { GetUserEmail, withAppSyncUserEmail }