I am not sure why refetch function is undefined, although it's available in type. I used this package before in SolidJS it worked there without any problem.
Also bun install with eslint + otqs has some dependency issues. (related to ajv)
import { defineConfig } from 'otqs';
export default defineConfig({
fastapi: {
input: "https://napa-uat-842879836103.us-east1.run.app/api/openapi.json",
output: {
mode: 'split',
target: "src/services/generated/endpoints",
schemas: "src/services/generated/model",
client: 'solid-query',
prettier: true,
override: {
//Optional
mutator: {
path: './src/services/apiClient.ts',
name: 'apiClient',
},
query: {
useQuery: true, // generate useQuery hooks
useInfinite: true, // generate useInfiniteQuery hooks
useInfiniteQueryParam: 'limit', // param for pagination
options: {
staleTime: 1000 * 60 * 5, // 5 min fresh
cacheTime: 1000 * 60 * 10, // 10 min in memory
refetchOnMount: false, // don't refetch on mount
refetchOnWindowFocus: false, // don't refetch on window focus
},
},
},
},
},
});
Edited: Find out the issue, by default solid query is happening on server side, but why? I dont want it to be default.
I am not sure why refetch function is undefined, although it's available in type. I used this package before in SolidJS it worked there without any problem.
Also bun install with eslint + otqs has some dependency issues. (related to ajv)
My config:
Edited: Find out the issue, by default solid query is happening on server side, but why? I dont want it to be default.