Skip to content

UseGraphQLQueryOptions

Options for useGraphQLQuery hook

Type Parameter
T
Property Type Description
enabled? boolean Whether the query is enabled Default true
gcTime? number Time in milliseconds after which inactive query data is garbage collected Default 5 minutes
operationName? string Operation name when the document contains multiple operations
refetchOnWindowFocus? boolean Whether to refetch on window focus Default true
requestOptions? GraphQLRequestOptions Additional request options
select? (data) => T | undefined Transform function to process the response data
staleTime? number Time in milliseconds after which the query is considered stale Default 0 (considered stale immediately)
variables? Record<string, unknown> Variables to pass to the GraphQL query