Closed Meemaw closed 11 months ago
@Meemaw This is a great idea for a feature, and after discussing internally we combined it with fetchPolicy
into a new queryOptionsFromContext
configuration. This lets you specify any configuration to loadQuery
based on ctx
and should satisfy this feature as well. We just released this in v3.0.0
, can you please test this out and let us know if it works for you? Thanks!
@rrdelaney that works, thanks!
Add support for providing
cacheConfig
from context. This can be useful for a few reasons:metadata
to the fetch functionNote that its possible to achieve 2. today with
variablesFromContext
as well, but its a bit more annoying, because we don't want to send that as an actual variable to the graphql endpoint, we might want to do some conditional logic based on metadata, or send special headers.