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