Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetch-and-network is missing from useQuery #163

Closed
duongdev opened this issue May 22, 2019 · 1 comment · Fixed by #169
Closed

fetch-and-network is missing from useQuery #163

duongdev opened this issue May 22, 2019 · 1 comment · Fixed by #169

Comments

@duongdev
Copy link

Seems in the new version of apollo-client, the FetchPolicy interface is no longer contains cache-and-network option so react-apollo-hooks throws error when I use fetchPolicy: cache-and-network with useQuery.

https://github.com/apollographql/apollo-client/blob/bd7dc77e1cf897a74d86d2e8728daf37af8b5e3c/packages/apollo-client/src/core/watchQueryOptions.ts#L18

@markpradhan
Copy link

You can do this in the meanwhile.

  useQuery(QueryUserProfile, {
    suspend: false,
    fetchPolicy: 'cache-and-network',
  } as any)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants