import gql from 'graphql-tag' import { graphql, compose } from 'react-apollo' const GetServiceInfo = gql` query GetServiceInfo() { getServiceInfo() { name version uri title description } }` const withAppSyncServiceInfo = compose( graphql(GetServiceInfo, { name: 'getServiceInfo', options: (ownProps) => ({ fetchPolicy: 'cache-and-network', variables: { } }), props: (props) => { if (props.getServiceInfo.error) console.log(props.getServiceInfo.error) return props } }) ) export { GetServiceInfo, withAppSyncServiceInfo }