Open
Description
I have the code with 2 api calls - one with "openapi-fetch" other with "openapi-react-query"
but only "openapi-react-query" have actual error on paths that didn't exist,
"openapi-fetch"generates the Type instantiation is excessively deep and possibly infinite.
Because of that vscode autocomplete didn't work in case with "openapi-fetch"
import type { paths } from "app/typings/__generated/api";
import createFetchClient from "openapi-fetch";
import createClient from "openapi-react-query";
export const fetchClient = createFetchClient<paths>({});
export const $api = createClient(fetchClient);
fetchClient.GET("/api/d");
// ^ Type instantiation is excessively deep and possibly infinite.
$api.useQuery("get", "/api/sdf");
// ^ Argument of type '"/api/sdf"' is not assignable to parameter of type 'PathsWithMethod<paths, "get">'
fetchClient.GET("/api/accessgroup");
// ^ Existing url works fine
$api.useQuery("get", "/api/accessgroup");
// ^ Existing url works fine
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Accepted