Shahen 🔺
Shahen 🔺
CCConvex Community
Created by Shahen 🔺 on 10/16/2024 in #support-community
Paginated query with Tanstack Query
Is there any way to use paginated queries with Tanstack query?
30 replies
CCConvex Community
Created by Shahen 🔺 on 9/2/2024 in #support-community
ts-api-spec no type safety
Hello guys, I am trying multiple repos. I have a simple "tasks"(same as example in docs) schema and function in project 1. I ran npx convex-helpers ts-api-spec, copied the code over to project 2 in api.ts But I am not getting any type safety when calling useQuery. api.ts example:
import { FunctionReference, anyApi } from "convex/server";
import { GenericId as Id } from "convex/values";

export const api: PublicApiType = anyApi as unknown as PublicApiType;
export const internal: InternalApiType = anyApi as unknown as InternalApiType;

export type PublicApiType = {
auth: {
signIn: FunctionReference<
"action",
"public",
{
params?: any;
provider?: string;
refreshToken?: string;
verifier?: string;
},
any
>;
signOut: FunctionReference<"action", "public", Record<string, never>, any>;
};
tasks: {
get: FunctionReference<"query", "public", Record<string, never>, any>;
};
};
export type InternalApiType = {};
import { FunctionReference, anyApi } from "convex/server";
import { GenericId as Id } from "convex/values";

export const api: PublicApiType = anyApi as unknown as PublicApiType;
export const internal: InternalApiType = anyApi as unknown as InternalApiType;

export type PublicApiType = {
auth: {
signIn: FunctionReference<
"action",
"public",
{
params?: any;
provider?: string;
refreshToken?: string;
verifier?: string;
},
any
>;
signOut: FunctionReference<"action", "public", Record<string, never>, any>;
};
tasks: {
get: FunctionReference<"query", "public", Record<string, never>, any>;
};
};
export type InternalApiType = {};
4 replies