Skip to content

UseGraphQLQueryOptions

Options for useGraphQLQuery hook

Type Parameter
T
PropertyTypeDescription
enabled?booleanWhether the query is enabled Default true
gcTime?numberTime in milliseconds after which inactive query data is garbage collected Default 5 minutes
operationName?stringOperation name when the document contains multiple operations
refetchOnWindowFocus?booleanWhether to refetch on window focus Default true
requestOptions?GraphQLRequestOptionsAdditional request options
select?(data: undefined | T) => undefined | TTransform function to process the response data
staleTime?numberTime 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