-
-
Notifications
You must be signed in to change notification settings - Fork 247
Open
Labels
needs info ⏳Further information is requiredFurther information is required
Description
Hey, I am struggling to understand how I can configure throwOnError
when using the @tanstack/react-query
plugin.
In tanstack react-query the default value of throwOnError
is false
but when generating query options using hey-api cli I get the following code generated:
export const xxxGetOptions = (options?: Options<xxxData>) => {
return queryOptions({
queryFn: async ({ queryKey, signal }) => {
const { data } = await xxxGet({
...options,
...queryKey[0],
signal,
throwOnError: true
});
return data;
},
queryKey: xxxGetQueryKey(options)
});
};
which always sets throwOnError
to true
. There seems to be no way to override this.
nimaebra
Metadata
Metadata
Assignees
Labels
needs info ⏳Further information is requiredFurther information is required