Title
h

hammerspb

07/15/2017, 4:11 AM
Hi. I have some issues with getting user with fetchPolicy:'network-only'. When I load component first time - everything is fine. But when I try to refresh it (lets say using
this.props.history.push('same url')
) apollo client doesn't send request to the server. It looks like it gets all data from cache.
n

nilan

07/15/2017, 11:07 AM
the problem is that the query is not sent again, not that it gets resolved from cache
h

hammerspb

07/15/2017, 3:33 PM
hmmm. graphql runs query
const withUser = graphql(USER_QUERY, {
  options: {
    fetchPolicy: 'network-only',
  },
  props: ({ ownProps, data }) => {
    console.log('App::graphql::user', data.user)
  },
})