[ILUGC] Re: Would like help with React native - React apollo - AWS

  • From: "M.M. Kishore Kumar" <realmailer@xxxxxxxxx>
  • To: ilugc@xxxxxxxxxxxxx
  • Date: Fri, 25 May 2018 22:27:14 +0530

​as I see your code snippet is
"
this.props.client.query({
  query: ListSubjects,
  options: {
    fetchPolicy: 'network-only',
    cachePolicy: { query: true, data: true },
  },
.."

Daniel; here in this thread
https://stackoverflow.com/questions/46183564/react-apollo-specifying-option-fetchpolicy-network-only-using-withapollo-doe
​

says something of relevance:

"You just need to modify how you're passing in the fetchPolicy option. If
you look in the docs
<http://dev.apollodata.com/core/apollo-client-api.html#ApolloClient.query>,
there is no options property on the options object passed to query. Here's
the correct way to set the fetch policy:

this.props.client.query({
  query: getStuff,
  variables,
  fetchPolicy: "network-only",
})
"

Does that help?

_____________________________________
ILUGC List: http://www.freelists.org/list/ilugc
ILUGC Web: http://ilugc.in/

Other related posts: