In my query, I use a blend of remote and local properties. The local properties have different values depending on:
- The remote properties
- The current unix timestamp
The local resolvers computes the local state according to these rules. Now, I face a scenario whereby I need to forego useQuery
and use Apollo Client's query
for enhanced flexibility.
Other than structural differences (e.g. useQuery
accepts two parameters, whereas client.query
takes only one parameter - the options objects), is it safe to use one over the other?
I identified at least one difference not described in the docs. When I call client.query
multiple times, the local resolvers are run only once, at the beginning. With useQuery
, the data always gets recomputed and it has different values (as per #2 above).