menu

Apollo

A community of developers, designers and others who love Apollo and GraphQL. 🚀

Channels
# All channels
view-forward
# General
view-forward
# Apollo Angular
view-forward
# Announcements
view-forward
# Apollo Android
view-forward
# Apollo Client
view-forward
# Apollo iOS
view-forward
# Apollo Link
view-forward
# Apollo Link Rest
view-forward
# Local State
view-forward
# Apollo Studio
view-forward
# Apollo Server
view-forward
# Apollo Tooling
view-forward
# Contributing
view-forward
# Docs
view-forward
# Events
view-forward
# GraphQL Tools
view-forward
# Jobs
view-forward
# Random
view-forward
# React Apollo
view-forward
# Showcase
view-forward
# Subscriptions
view-forward
# Testing
view-forward
# Vue Apollo
view-forward
Team

Is there a way to configure the default fetchPolicy to be `cache-and-network`…

July 1, 2020 at 8:48pm

Is there a way to configure the default fetchPolicy to be `cache-and-network` for useQuery?

July 1, 2020 at 8:48pm (Edited 1 month ago)
When instanciating the Apollo client, you can provide fetch policies for query, watchQuery and mutation. The docs mention that the Query component uses watchQuery. As the useQuery hook isn’t mentioned as well, this implies useQuery uses query instead, but cache-and-Network is no valid fetchPolicy for query.
Any pointers?
No messages yet