Interface: GraphQLFetchOptions
Defined in: client/GraphQLClient.ts:25
Per-operation fetch hints passed through to the underlying fetch() call.
Deliberately narrow: callers can't reach method, headers, body, or
signal — those are SDK invariants. The two slots below cover the
standard fetch() extension surface that hosting runtimes have converged
on; the SDK forwards them verbatim and doesn't introspect either.
NEVER serialised into the GraphQL request body — see execute(). Two
callers passing the same { query, variables, operationName } with
different fetchOptions (e.g. different tags) MUST hit the same cache
entry. The body is the cache key; fetchOptions is a transport hint.
If your host runtime uses a different mechanism (e.g. an
application-level proxy keyed by request headers, like propeller-vue's
/api/graphql LRU), set headers on the GraphQL client config instead
— fetchOptions is for runtimes that consume hints directly on
fetch().
Properties
cache?
optionalcache?:RequestCache
Defined in: client/GraphQLClient.ts:27
Standard fetch cache mode ('force-cache' | 'no-store' | ...).
next?
optionalnext?:object
Defined in: client/GraphQLClient.ts:38
Host-framework fetch() extension. The de-facto slot used by
Next.js, Cloudflare Workers, and Nitro (when wrapping undici) to
carry data-cache hints alongside a request. The SDK passes this
through to fetch() unmodified — it has no Next.js dependency.
Shape (loosely standardised across the runtimes above):
revalidate: TTL in seconds, orfalseto opt out of caching.tags: surgical-invalidation keys the runtime tracks per entry.
revalidate?
optionalrevalidate?:number|false
tags?
optionaltags?: readonlystring[]