Files
landscape-template/src/pages/ExplorePage/ProjectsSection/query.ts
2022-03-12 17:58:37 +02:00

38 lines
624 B
TypeScript

import { gql } from "@apollo/client";
import { ProjectCard, } from "src/utils/interfaces";
export const ALL_CATEGORIES_PROJECTS_QUERY = gql`
query AllCategoriesProjects {
allCategories {
id
title
project {
id
thumbnail_image
title
votes_count
}
}
newProjects {
id
title
thumbnail_image
votes_count
category {
title
id
}
}
}
`;
export type ALL_CATEGORIES_PROJECTS_RES = {
newProjects: ProjectCard[],
allCategories: {
id: number;
title: string;
project: ProjectCard[];
}[];
};