import gql from 'graphql-tag' import { graphql, compose } from 'react-apollo' const GetChange = gql` query GetChange($orgKey: String, $applicationKey: String, $from: String, $to: String, $type: String, $limit: Int, $offset: Int) { getChange(orgKey: $orgKey, applicationKey: $applicationKey, from: $from, to: $to, type: $type, limit: $limit, offset: $offset) { } }` const withAppSyncChange = compose( graphql(GetChange, { name: 'getChange', options: (ownProps) => ({ fetchPolicy: 'cache-and-network', variables: { orgKey: ownProps.orgKey, applicationKey: ownProps.applicationKey, from: ownProps.from, to: ownProps.to, type: ownProps.type, limit: ownProps.limit, offset: ownProps.offset } }), props: (props) => { if (props.getChange.error) console.log(props.getChange.error) return props } }) ) export { GetChange, withAppSyncChange }