1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-09-25 00:21:28 +02:00
Files
developer-roadmap/src/queries/official-roadmap.ts
2025-05-12 19:35:43 +06:00

24 lines
525 B
TypeScript

import { queryOptions } from '@tanstack/react-query';
import { httpGet } from '../lib/query-http';
export interface OfficialRoadmapDocument {
_id: string;
title: string;
description?: string;
slug: string;
nodes: any[];
edges: any[];
createdAt: Date;
updatedAt: Date;
}
export function officialRoadmapOptions(slug: string) {
return queryOptions({
queryKey: ['official-roadmap', slug],
queryFn: () => {
return httpGet<OfficialRoadmapDocument>(`/v1-official-roadmap/${slug}`);
},
});
}