feat: add graphql

This commit is contained in:
Zotov Ivan Yuryevich
2026-04-05 23:47:29 +03:00
parent 4b196e3d0e
commit 8b100c18b7
13 changed files with 6246 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
/* eslint-disable */
/* Generated by scripts/endpoint-generate.mjs — do not edit by hand */
import type { ExecutionResult } from "graphql";
import { execute } from "../graphql/execute";
import type { CategoriesListQuery, CategoriesListQueryVariables } from "../graphql/graphql";
import { categoriesListDocument } from "./categories.gql";
export const categoriesListQuery = {
async execute(variables?: CategoriesListQueryVariables): Promise<ExecutionResult<CategoriesListQuery>> {
return execute<CategoriesListQuery, CategoriesListQueryVariables>(categoriesListDocument, variables);
},
};

View File

@@ -0,0 +1,14 @@
import gql from "graphql-tag";
export const categoriesListDocument = gql`
query CategoriesList {
categories {
documentId
slug
title
sortOrder
group
badge
}
}
`;

View File

@@ -0,0 +1,13 @@
/* eslint-disable */
/* Generated by scripts/endpoint-generate.mjs — do not edit by hand */
import type { ExecutionResult } from "graphql";
import { execute } from "../graphql/execute";
import type { HomePageQuery, HomePageQueryVariables } from "../graphql/graphql";
import { homePageDocument } from "./home-page.gql";
export const homePageQuery = {
async execute(variables?: HomePageQueryVariables): Promise<ExecutionResult<HomePageQuery>> {
return execute<HomePageQuery, HomePageQueryVariables>(homePageDocument, variables);
},
};

View File

@@ -0,0 +1,38 @@
import gql from "graphql-tag";
export const homePageDocument = gql`
query HomePage {
homePage {
sections {
... on ComponentSectionsHomeHero {
title
description
badge
stats {
id
key
value
}
}
... on ComponentSectionsServices {
title
description
cards {
id
title
description
color {
value
}
icon {
value
}
category {
slug
}
}
}
}
}
}
`;