From d0ff2907cb1e2262c9991747edb0b1538076f589 Mon Sep 17 00:00:00 2001 From: Zotov Ivan Yuryevich Date: Wed, 8 Apr 2026 22:33:20 +0300 Subject: [PATCH] generate schema --- schema.graphql | 88 ++++++++++- src/graphql-documents/home-page.gql.ts | 68 ++++++++- src/graphql/graphql.ts | 201 +++++++++++++++++++++++-- 3 files changed, 337 insertions(+), 20 deletions(-) diff --git a/schema.graphql b/schema.graphql index a19b754..2a43ab8 100644 --- a/schema.graphql +++ b/schema.graphql @@ -75,6 +75,48 @@ type CategoryRelationResponseCollection { nodes: [Category!]! } +type ComponentCardsAdvantage { + color: ComponentSharedColor + description: String + icon: ComponentSharedIcon + id: ID! + title: String +} + +input ComponentCardsAdvantageFiltersInput { + and: [ComponentCardsAdvantageFiltersInput] + color: ComponentSharedColorFiltersInput + description: StringFilterInput + icon: ComponentSharedIconFiltersInput + not: ComponentCardsAdvantageFiltersInput + or: [ComponentCardsAdvantageFiltersInput] + title: StringFilterInput +} + +type ComponentCardsCase { + badge: String + color: ComponentSharedColor + description: String + footnote: String + icon: ComponentSharedIcon + id: ID! + pretitle: String + title: String +} + +input ComponentCardsCaseFiltersInput { + and: [ComponentCardsCaseFiltersInput] + badge: StringFilterInput + color: ComponentSharedColorFiltersInput + description: StringFilterInput + footnote: StringFilterInput + icon: ComponentSharedIconFiltersInput + not: ComponentCardsCaseFiltersInput + or: [ComponentCardsCaseFiltersInput] + pretitle: StringFilterInput + title: StringFilterInput +} + type ComponentCardsService { category: Category color: ComponentSharedColor @@ -95,6 +137,41 @@ input ComponentCardsServiceFiltersInput { title: StringFilterInput } +type ComponentCardsSolution { + category: Category + description: String + footnote: String + icon: ComponentSharedIcon + id: ID! + title: String +} + +input ComponentCardsSolutionFiltersInput { + and: [ComponentCardsSolutionFiltersInput] + category: CategoryFiltersInput + description: StringFilterInput + footnote: StringFilterInput + icon: ComponentSharedIconFiltersInput + not: ComponentCardsSolutionFiltersInput + or: [ComponentCardsSolutionFiltersInput] + title: StringFilterInput +} + +type ComponentSectionsAbout { + cards(filters: ComponentCardsAdvantageFiltersInput, pagination: PaginationArg = {}, sort: [String] = []): [ComponentCardsAdvantage] + description: String + id: ID! + partners(filters: ComponentSharedStringFiltersInput, pagination: PaginationArg = {}, sort: [String] = []): [ComponentSharedString] + title: String +} + +type ComponentSectionsCases { + cards(filters: ComponentCardsCaseFiltersInput, pagination: PaginationArg = {}, sort: [String] = []): [ComponentCardsCase] + description: String + id: ID! + title: String +} + type ComponentSectionsHomeHero { badge: String description: String @@ -110,6 +187,13 @@ type ComponentSectionsServices { title: String } +type ComponentSectionsSolutions { + cards(filters: ComponentCardsSolutionFiltersInput, pagination: PaginationArg = {}, sort: [String] = []): [ComponentCardsSolution] + description: String + id: ID! + title: String +} + type ComponentSharedAttribute { id: ID! key: String @@ -285,7 +369,7 @@ input FloatFilterInput { startsWith: Float } -union GenericMorph = Category | ComponentCardsService | ComponentSectionsHomeHero | ComponentSectionsServices | ComponentSharedAttribute | ComponentSharedColor | ComponentSharedContact | ComponentSharedIcon | ComponentSharedString | HomePage | I18NLocale | ReviewWorkflowsWorkflow | ReviewWorkflowsWorkflowStage | SiteConfig | UploadFile | UsersPermissionsPermission | UsersPermissionsRole | UsersPermissionsUser | Vendor +union GenericMorph = Category | ComponentCardsAdvantage | ComponentCardsCase | ComponentCardsService | ComponentCardsSolution | ComponentSectionsAbout | ComponentSectionsCases | ComponentSectionsHomeHero | ComponentSectionsServices | ComponentSectionsSolutions | ComponentSharedAttribute | ComponentSharedColor | ComponentSharedContact | ComponentSharedIcon | ComponentSharedString | HomePage | I18NLocale | ReviewWorkflowsWorkflow | ReviewWorkflowsWorkflowStage | SiteConfig | UploadFile | UsersPermissionsPermission | UsersPermissionsRole | UsersPermissionsUser | Vendor type HomePage { createdAt: DateTime @@ -300,7 +384,7 @@ input HomePageInput { sections: [HomePageSectionsDynamicZoneInput!] } -union HomePageSectionsDynamicZone = ComponentSectionsHomeHero | ComponentSectionsServices | Error +union HomePageSectionsDynamicZone = ComponentSectionsAbout | ComponentSectionsCases | ComponentSectionsHomeHero | ComponentSectionsServices | ComponentSectionsSolutions | Error scalar HomePageSectionsDynamicZoneInput diff --git a/src/graphql-documents/home-page.gql.ts b/src/graphql-documents/home-page.gql.ts index 53efcfb..a5ae256 100644 --- a/src/graphql-documents/home-page.gql.ts +++ b/src/graphql-documents/home-page.gql.ts @@ -1,10 +1,11 @@ -import gql from "graphql-tag"; +import gql from 'graphql-tag' export const homePageDocument = gql` - query HomePage { + query HomePageQuery { homePage { sections { ... on ComponentSectionsHomeHero { + id title description badge @@ -15,8 +16,66 @@ export const homePageDocument = gql` } } ... on ComponentSectionsServices { + id title description + cards { + id + title + description + icon { + value + } + color { + value + } + category { + slug + } + } + } + ... on ComponentSectionsSolutions { + id + title + description + cards { + id + title + description + icon { + value + } + category { + slug + } + } + } + ... on ComponentSectionsCases { + id + title + description + cards { + id + title + description + pretitle + badge + color { + value + } + icon { + value + } + } + } + ... on ComponentSectionsAbout { + id + title + description + partners(pagination: { pageSize: 100 }) { + id + value + } cards { id title @@ -27,12 +86,9 @@ export const homePageDocument = gql` icon { value } - category { - slug - } } } } } } -`; +` diff --git a/src/graphql/graphql.ts b/src/graphql/graphql.ts index 246388e..b40b316 100644 --- a/src/graphql/graphql.ts +++ b/src/graphql/graphql.ts @@ -115,6 +115,50 @@ export type CategoryRelationResponseCollection = { nodes: Array; }; +export type ComponentCardsAdvantage = { + __typename?: 'ComponentCardsAdvantage'; + color?: Maybe; + description?: Maybe; + icon?: Maybe; + id: Scalars['ID']['output']; + title?: Maybe; +}; + +export type ComponentCardsAdvantageFiltersInput = { + and?: InputMaybe>>; + color?: InputMaybe; + description?: InputMaybe; + icon?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + title?: InputMaybe; +}; + +export type ComponentCardsCase = { + __typename?: 'ComponentCardsCase'; + badge?: Maybe; + color?: Maybe; + description?: Maybe; + footnote?: Maybe; + icon?: Maybe; + id: Scalars['ID']['output']; + pretitle?: Maybe; + title?: Maybe; +}; + +export type ComponentCardsCaseFiltersInput = { + and?: InputMaybe>>; + badge?: InputMaybe; + color?: InputMaybe; + description?: InputMaybe; + footnote?: InputMaybe; + icon?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + pretitle?: InputMaybe; + title?: InputMaybe; +}; + export type ComponentCardsService = { __typename?: 'ComponentCardsService'; category?: Maybe; @@ -136,6 +180,65 @@ export type ComponentCardsServiceFiltersInput = { title?: InputMaybe; }; +export type ComponentCardsSolution = { + __typename?: 'ComponentCardsSolution'; + category?: Maybe; + description?: Maybe; + footnote?: Maybe; + icon?: Maybe; + id: Scalars['ID']['output']; + title?: Maybe; +}; + +export type ComponentCardsSolutionFiltersInput = { + and?: InputMaybe>>; + category?: InputMaybe; + description?: InputMaybe; + footnote?: InputMaybe; + icon?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + title?: InputMaybe; +}; + +export type ComponentSectionsAbout = { + __typename?: 'ComponentSectionsAbout'; + cards?: Maybe>>; + description?: Maybe; + id: Scalars['ID']['output']; + partners?: Maybe>>; + title?: Maybe; +}; + + +export type ComponentSectionsAboutCardsArgs = { + filters?: InputMaybe; + pagination?: InputMaybe; + sort?: InputMaybe>>; +}; + + +export type ComponentSectionsAboutPartnersArgs = { + filters?: InputMaybe; + pagination?: InputMaybe; + sort?: InputMaybe>>; +}; + +export type ComponentSectionsCases = { + __typename?: 'ComponentSectionsCases'; + cards?: Maybe>>; + description?: Maybe; + id: Scalars['ID']['output']; + title?: Maybe; +}; + + +export type ComponentSectionsCasesCardsArgs = { + filters?: InputMaybe; + pagination?: InputMaybe; + sort?: InputMaybe>>; +}; + export type ComponentSectionsHomeHero = { __typename?: 'ComponentSectionsHomeHero'; badge?: Maybe; @@ -167,6 +270,21 @@ export type ComponentSectionsServicesCardsArgs = { sort?: InputMaybe>>; }; +export type ComponentSectionsSolutions = { + __typename?: 'ComponentSectionsSolutions'; + cards?: Maybe>>; + description?: Maybe; + id: Scalars['ID']['output']; + title?: Maybe; +}; + + +export type ComponentSectionsSolutionsCardsArgs = { + filters?: InputMaybe; + pagination?: InputMaybe; + sort?: InputMaybe>>; +}; + export type ComponentSharedAttribute = { __typename?: 'ComponentSharedAttribute'; id: Scalars['ID']['output']; @@ -344,7 +462,7 @@ export type FloatFilterInput = { startsWith?: InputMaybe; }; -export type GenericMorph = Category | ComponentCardsService | ComponentSectionsHomeHero | ComponentSectionsServices | ComponentSharedAttribute | ComponentSharedColor | ComponentSharedContact | ComponentSharedIcon | ComponentSharedString | HomePage | I18NLocale | ReviewWorkflowsWorkflow | ReviewWorkflowsWorkflowStage | SiteConfig | UploadFile | UsersPermissionsPermission | UsersPermissionsRole | UsersPermissionsUser | Vendor; +export type GenericMorph = Category | ComponentCardsAdvantage | ComponentCardsCase | ComponentCardsService | ComponentCardsSolution | ComponentSectionsAbout | ComponentSectionsCases | ComponentSectionsHomeHero | ComponentSectionsServices | ComponentSectionsSolutions | ComponentSharedAttribute | ComponentSharedColor | ComponentSharedContact | ComponentSharedIcon | ComponentSharedString | HomePage | I18NLocale | ReviewWorkflowsWorkflow | ReviewWorkflowsWorkflowStage | SiteConfig | UploadFile | UsersPermissionsPermission | UsersPermissionsRole | UsersPermissionsUser | Vendor; export type HomePage = { __typename?: 'HomePage'; @@ -360,7 +478,7 @@ export type HomePageInput = { sections?: InputMaybe>; }; -export type HomePageSectionsDynamicZone = ComponentSectionsHomeHero | ComponentSectionsServices | Error; +export type HomePageSectionsDynamicZone = ComponentSectionsAbout | ComponentSectionsCases | ComponentSectionsHomeHero | ComponentSectionsServices | ComponentSectionsSolutions | Error; export type I18NLocale = { __typename?: 'I18NLocale'; @@ -1416,12 +1534,15 @@ export type CategoriesListQueryVariables = Exact<{ [key: string]: never; }>; export type CategoriesListQuery = { __typename?: 'Query', categories: Array<{ __typename?: 'Category', documentId: string, slug: string, title?: string | null, sortOrder: number, group: Enum_Category_Group, badge?: string | null } | null> }; -export type HomePageQueryVariables = Exact<{ [key: string]: never; }>; +export type HomePageQueryQueryVariables = Exact<{ [key: string]: never; }>; -export type HomePageQuery = { __typename?: 'Query', homePage?: { __typename?: 'HomePage', sections?: Array< - | { __typename?: 'ComponentSectionsHomeHero', title?: string | null, description?: string | null, badge?: string | null, stats?: Array<{ __typename?: 'ComponentSharedAttribute', id: string, key?: string | null, value?: string | null } | null> | null } - | { __typename?: 'ComponentSectionsServices', title?: string | null, description?: string | null, cards?: Array<{ __typename?: 'ComponentCardsService', id: string, title?: string | null, description?: string | null, color?: { __typename?: 'ComponentSharedColor', value?: Enum_Componentsharedcolor_Value | null } | null, icon?: { __typename?: 'ComponentSharedIcon', value?: Enum_Componentsharedicon_Value | null } | null, category?: { __typename?: 'Category', slug: string } | null } | null> | null } +export type HomePageQueryQuery = { __typename?: 'Query', homePage?: { __typename?: 'HomePage', sections?: Array< + | { __typename?: 'ComponentSectionsAbout', id: string, title?: string | null, description?: string | null, partners?: Array<{ __typename?: 'ComponentSharedString', id: string, value: string } | null> | null, cards?: Array<{ __typename?: 'ComponentCardsAdvantage', id: string, title?: string | null, description?: string | null, color?: { __typename?: 'ComponentSharedColor', value?: Enum_Componentsharedcolor_Value | null } | null, icon?: { __typename?: 'ComponentSharedIcon', value?: Enum_Componentsharedicon_Value | null } | null } | null> | null } + | { __typename?: 'ComponentSectionsCases', id: string, title?: string | null, description?: string | null, cards?: Array<{ __typename?: 'ComponentCardsCase', id: string, title?: string | null, description?: string | null, pretitle?: string | null, badge?: string | null, color?: { __typename?: 'ComponentSharedColor', value?: Enum_Componentsharedcolor_Value | null } | null, icon?: { __typename?: 'ComponentSharedIcon', value?: Enum_Componentsharedicon_Value | null } | null } | null> | null } + | { __typename?: 'ComponentSectionsHomeHero', id: string, title?: string | null, description?: string | null, badge?: string | null, stats?: Array<{ __typename?: 'ComponentSharedAttribute', id: string, key?: string | null, value?: string | null } | null> | null } + | { __typename?: 'ComponentSectionsServices', id: string, title?: string | null, description?: string | null, cards?: Array<{ __typename?: 'ComponentCardsService', id: string, title?: string | null, description?: string | null, icon?: { __typename?: 'ComponentSharedIcon', value?: Enum_Componentsharedicon_Value | null } | null, color?: { __typename?: 'ComponentSharedColor', value?: Enum_Componentsharedcolor_Value | null } | null, category?: { __typename?: 'Category', slug: string } | null } | null> | null } + | { __typename?: 'ComponentSectionsSolutions', id: string, title?: string | null, description?: string | null, cards?: Array<{ __typename?: 'ComponentCardsSolution', id: string, title?: string | null, description?: string | null, icon?: { __typename?: 'ComponentSharedIcon', value?: Enum_Componentsharedicon_Value | null } | null, category?: { __typename?: 'Category', slug: string } | null } | null> | null } | { __typename?: 'Error' } | null> | null } | null }; @@ -1456,11 +1577,12 @@ export const CategoriesListDocument = new TypedDocumentString(` } } `) as unknown as TypedDocumentString; -export const HomePageDocument = new TypedDocumentString(` - query HomePage { +export const HomePageQueryDocument = new TypedDocumentString(` + query HomePageQuery { homePage { sections { ... on ComponentSectionsHomeHero { + id title description badge @@ -1471,8 +1593,66 @@ export const HomePageDocument = new TypedDocumentString(` } } ... on ComponentSectionsServices { + id title description + cards { + id + title + description + icon { + value + } + color { + value + } + category { + slug + } + } + } + ... on ComponentSectionsSolutions { + id + title + description + cards { + id + title + description + icon { + value + } + category { + slug + } + } + } + ... on ComponentSectionsCases { + id + title + description + cards { + id + title + description + pretitle + badge + color { + value + } + icon { + value + } + } + } + ... on ComponentSectionsAbout { + id + title + description + partners(pagination: {pageSize: 100}) { + id + value + } cards { id title @@ -1483,12 +1663,9 @@ export const HomePageDocument = new TypedDocumentString(` icon { value } - category { - slug - } } } } } } - `) as unknown as TypedDocumentString; \ No newline at end of file + `) as unknown as TypedDocumentString; \ No newline at end of file