commit
1c85800d56
14 changed files with 187 additions and 33 deletions
136
schema.graphql
136
schema.graphql
|
@ -322,6 +322,13 @@ input AttributeSortingInput {
|
|||
direction: OrderDirection!
|
||||
}
|
||||
|
||||
type AttributeTranslatableContent implements Node {
|
||||
id: ID!
|
||||
name: String!
|
||||
translation(languageCode: LanguageCodeEnum!): AttributeTranslation
|
||||
attribute: Attribute
|
||||
}
|
||||
|
||||
type AttributeTranslate {
|
||||
errors: [Error!]
|
||||
attribute: Attribute
|
||||
|
@ -414,6 +421,13 @@ input AttributeValueInput {
|
|||
values: [String]!
|
||||
}
|
||||
|
||||
type AttributeValueTranslatableContent implements Node {
|
||||
id: ID!
|
||||
name: String!
|
||||
translation(languageCode: LanguageCodeEnum!): AttributeValueTranslation
|
||||
attributeValue: AttributeValue
|
||||
}
|
||||
|
||||
type AttributeValueTranslate {
|
||||
errors: [Error!]
|
||||
attributeValue: AttributeValue
|
||||
|
@ -486,9 +500,9 @@ type Category implements Node {
|
|||
seoDescription: String
|
||||
id: ID!
|
||||
name: String!
|
||||
slug: String!
|
||||
description: String!
|
||||
descriptionJson: JSONString!
|
||||
slug: String!
|
||||
parent: Category
|
||||
level: Int!
|
||||
privateMeta: [MetaStore]!
|
||||
|
@ -556,6 +570,17 @@ input CategoryInput {
|
|||
backgroundImageAlt: String
|
||||
}
|
||||
|
||||
type CategoryTranslatableContent implements Node {
|
||||
seoTitle: String
|
||||
seoDescription: String
|
||||
id: ID!
|
||||
name: String!
|
||||
description: String!
|
||||
descriptionJson: JSONString!
|
||||
translation(languageCode: LanguageCodeEnum!): CategoryTranslation
|
||||
category: Category
|
||||
}
|
||||
|
||||
type CategoryTranslate {
|
||||
errors: [Error!]
|
||||
category: Category
|
||||
|
@ -809,15 +834,15 @@ type ChoiceValue {
|
|||
}
|
||||
|
||||
type Collection implements Node {
|
||||
publicationDate: Date
|
||||
isPublished: Boolean!
|
||||
seoTitle: String
|
||||
seoDescription: String
|
||||
id: ID!
|
||||
name: String!
|
||||
slug: String!
|
||||
description: String!
|
||||
descriptionJson: JSONString!
|
||||
publicationDate: Date
|
||||
isPublished: Boolean!
|
||||
slug: String!
|
||||
privateMeta: [MetaStore]!
|
||||
meta: [MetaStore]!
|
||||
products(before: String, after: String, first: Int, last: Int): ProductCountableConnection
|
||||
|
@ -925,6 +950,17 @@ type CollectionReorderProducts {
|
|||
productErrors: [ProductError!]
|
||||
}
|
||||
|
||||
type CollectionTranslatableContent implements Node {
|
||||
seoTitle: String
|
||||
seoDescription: String
|
||||
id: ID!
|
||||
name: String!
|
||||
description: String!
|
||||
descriptionJson: JSONString!
|
||||
translation(languageCode: LanguageCodeEnum!): CollectionTranslation
|
||||
collection: Collection
|
||||
}
|
||||
|
||||
type CollectionTranslate {
|
||||
errors: [Error!]
|
||||
collection: Collection
|
||||
|
@ -968,7 +1004,7 @@ type ConfigurationItem {
|
|||
|
||||
input ConfigurationItemInput {
|
||||
name: String!
|
||||
value: String!
|
||||
value: String
|
||||
}
|
||||
|
||||
enum ConfigurationTypeFieldEnum {
|
||||
|
@ -1483,6 +1519,7 @@ input DraftOrderCreateInput {
|
|||
shippingAddress: AddressInput
|
||||
shippingMethod: ID
|
||||
voucher: ID
|
||||
customerNote: String
|
||||
lines: [OrderLineCreateInput]
|
||||
}
|
||||
|
||||
|
@ -1500,6 +1537,7 @@ input DraftOrderInput {
|
|||
shippingAddress: AddressInput
|
||||
shippingMethod: ID
|
||||
voucher: ID
|
||||
customerNote: String
|
||||
}
|
||||
|
||||
type DraftOrderLineDelete {
|
||||
|
@ -1560,7 +1598,7 @@ type Fulfillment implements Node {
|
|||
fulfillmentOrder: Int!
|
||||
status: FulfillmentStatus!
|
||||
trackingNumber: String!
|
||||
shippingDate: DateTime!
|
||||
created: DateTime!
|
||||
privateMeta: [MetaStore]!
|
||||
meta: [MetaStore]!
|
||||
lines: [FulfillmentLine]
|
||||
|
@ -1876,9 +1914,9 @@ input MenuInput {
|
|||
|
||||
type MenuItem implements Node {
|
||||
id: ID!
|
||||
name: String!
|
||||
sortOrder: Int @deprecated(reason: "Will be dropped in 2.10 and is deprecated since 2.9: use the position in list instead and relative calculus to determine shift position.")
|
||||
menu: Menu!
|
||||
name: String!
|
||||
parent: MenuItem
|
||||
category: Category
|
||||
collection: Collection
|
||||
|
@ -1952,6 +1990,13 @@ input MenuItemMoveInput {
|
|||
sortOrder: Int
|
||||
}
|
||||
|
||||
type MenuItemTranslatableContent implements Node {
|
||||
id: ID!
|
||||
name: String!
|
||||
translation(languageCode: LanguageCodeEnum!): MenuItemTranslation
|
||||
menuItem: MenuItem
|
||||
}
|
||||
|
||||
type MenuItemTranslate {
|
||||
errors: [Error!]
|
||||
menuItem: MenuItem
|
||||
|
@ -2006,7 +2051,7 @@ type MetaStore {
|
|||
type Money {
|
||||
currency: String!
|
||||
amount: Float!
|
||||
localized: String!
|
||||
localized: String! @deprecated(reason: "DEPRECATED: Will be removed in Saleor 2.11. Price formatting according to the current locale should be handled by the frontend client.")
|
||||
}
|
||||
|
||||
type MoneyRange {
|
||||
|
@ -2586,15 +2631,15 @@ type OrderVoid {
|
|||
}
|
||||
|
||||
type Page implements Node {
|
||||
publicationDate: Date
|
||||
isPublished: Boolean!
|
||||
seoTitle: String
|
||||
seoDescription: String
|
||||
id: ID!
|
||||
slug: String!
|
||||
title: String!
|
||||
content: String!
|
||||
contentJson: JSONString!
|
||||
publicationDate: Date
|
||||
isPublished: Boolean!
|
||||
slug: String!
|
||||
created: DateTime!
|
||||
translation(languageCode: LanguageCodeEnum!): PageTranslation
|
||||
}
|
||||
|
@ -2651,9 +2696,20 @@ input PageInput {
|
|||
seo: SeoInput
|
||||
}
|
||||
|
||||
type PageTranslatableContent implements Node {
|
||||
seoTitle: String
|
||||
seoDescription: String
|
||||
id: ID!
|
||||
title: String!
|
||||
content: String!
|
||||
contentJson: JSONString!
|
||||
translation(languageCode: LanguageCodeEnum!): PageTranslation
|
||||
page: Page
|
||||
}
|
||||
|
||||
type PageTranslate {
|
||||
errors: [Error!]
|
||||
page: Page
|
||||
page: PageTranslatableContent
|
||||
}
|
||||
|
||||
type PageTranslation implements Node {
|
||||
|
@ -2854,15 +2910,15 @@ input PriceRangeInput {
|
|||
|
||||
type Product implements Node {
|
||||
id: ID!
|
||||
publicationDate: Date
|
||||
isPublished: Boolean!
|
||||
seoTitle: String
|
||||
seoDescription: String
|
||||
productType: ProductType!
|
||||
name: String!
|
||||
description: String!
|
||||
descriptionJson: JSONString!
|
||||
category: Category!
|
||||
publicationDate: Date
|
||||
isPublished: Boolean!
|
||||
productType: ProductType!
|
||||
category: Category
|
||||
updatedAt: DateTime
|
||||
chargeTaxes: Boolean!
|
||||
weight: Weight
|
||||
|
@ -2979,6 +3035,7 @@ input ProductFilterInput {
|
|||
isPublished: Boolean
|
||||
collections: [ID]
|
||||
categories: [ID]
|
||||
hasCategory: Boolean
|
||||
price: PriceRangeInput
|
||||
attributes: [AttributeInput]
|
||||
stockAvailability: StockAvailability
|
||||
|
@ -3082,6 +3139,17 @@ type ProductPricingInfo {
|
|||
priceRangeLocalCurrency: TaxedMoneyRange
|
||||
}
|
||||
|
||||
type ProductTranslatableContent implements Node {
|
||||
id: ID!
|
||||
seoTitle: String
|
||||
seoDescription: String
|
||||
name: String!
|
||||
description: String!
|
||||
descriptionJson: JSONString!
|
||||
translation(languageCode: LanguageCodeEnum!): ProductTranslation
|
||||
product: Product
|
||||
}
|
||||
|
||||
type ProductTranslate {
|
||||
errors: [Error!]
|
||||
product: Product
|
||||
|
@ -3226,8 +3294,8 @@ type ProductUpdatePrivateMeta {
|
|||
|
||||
type ProductVariant implements Node {
|
||||
id: ID!
|
||||
sku: String!
|
||||
name: String!
|
||||
sku: String!
|
||||
product: Product!
|
||||
trackInventory: Boolean!
|
||||
quantityAllocated: Int!
|
||||
|
@ -3330,6 +3398,13 @@ input ProductVariantInput {
|
|||
weight: WeightScalar
|
||||
}
|
||||
|
||||
type ProductVariantTranslatableContent implements Node {
|
||||
id: ID!
|
||||
name: String!
|
||||
translation(languageCode: LanguageCodeEnum!): ProductVariantTranslation
|
||||
productVariant: ProductVariant
|
||||
}
|
||||
|
||||
type ProductVariantTranslate {
|
||||
errors: [Error!]
|
||||
productVariant: ProductVariant
|
||||
|
@ -3365,6 +3440,7 @@ type Query {
|
|||
webhookEvents: [WebhookEvent]
|
||||
webhookSamplePayload(eventType: WebhookEventTypeEnum!): JSONString
|
||||
translations(kind: TranslatableKinds!, before: String, after: String, first: Int, last: Int): TranslatableItemConnection
|
||||
translation(id: ID!, kind: TranslatableKinds!): TranslatableItem
|
||||
shop: Shop
|
||||
shippingZone(id: ID!): ShippingZone
|
||||
shippingZones(before: String, after: String, first: Int, last: Int): ShippingZoneCountableConnection
|
||||
|
@ -3418,7 +3494,6 @@ type Query {
|
|||
serviceAccounts(filter: ServiceAccountFilterInput, before: String, after: String, first: Int, last: Int): ServiceAccountCountableConnection
|
||||
serviceAccount(id: ID!): ServiceAccount
|
||||
user(id: ID!): User
|
||||
node(id: ID!): Node
|
||||
_entities(representations: [_Any]): [_Entity]
|
||||
_service: _Service
|
||||
}
|
||||
|
@ -3515,6 +3590,13 @@ type SaleRemoveCatalogues {
|
|||
sale: Sale
|
||||
}
|
||||
|
||||
type SaleTranslatableContent implements Node {
|
||||
id: ID!
|
||||
name: String!
|
||||
translation(languageCode: LanguageCodeEnum!): SaleTranslation
|
||||
sale: Sale
|
||||
}
|
||||
|
||||
type SaleTranslate {
|
||||
errors: [Error!]
|
||||
sale: Sale
|
||||
|
@ -3670,6 +3752,13 @@ type ShippingMethod implements Node {
|
|||
translation(languageCode: LanguageCodeEnum!): ShippingMethodTranslation
|
||||
}
|
||||
|
||||
type ShippingMethodTranslatableContent implements Node {
|
||||
id: ID!
|
||||
name: String!
|
||||
translation(languageCode: LanguageCodeEnum!): ShippingMethodTranslation
|
||||
shippingMethod: ShippingMethod
|
||||
}
|
||||
|
||||
type ShippingMethodTranslation implements Node {
|
||||
id: ID!
|
||||
name: String
|
||||
|
@ -4020,7 +4109,7 @@ enum TransactionKind {
|
|||
CONFIRM
|
||||
}
|
||||
|
||||
union TranslatableItem = Product | Category | Collection | Attribute | AttributeValue | ProductVariant | Page | ShippingMethod | Sale | Voucher | MenuItem
|
||||
union TranslatableItem = ProductTranslatableContent | CollectionTranslatableContent | CategoryTranslatableContent | AttributeTranslatableContent | AttributeValueTranslatableContent | ProductVariantTranslatableContent | PageTranslatableContent | ShippingMethodTranslatableContent | SaleTranslatableContent | VoucherTranslatableContent | MenuItemTranslatableContent
|
||||
|
||||
type TranslatableItemConnection {
|
||||
pageInfo: PageInfo!
|
||||
|
@ -4190,8 +4279,8 @@ type VerifyToken {
|
|||
|
||||
type Voucher implements Node {
|
||||
id: ID!
|
||||
type: VoucherTypeEnum!
|
||||
name: String
|
||||
type: VoucherTypeEnum!
|
||||
code: String!
|
||||
usageLimit: Int
|
||||
used: Int!
|
||||
|
@ -4280,6 +4369,13 @@ type VoucherRemoveCatalogues {
|
|||
voucher: Voucher
|
||||
}
|
||||
|
||||
type VoucherTranslatableContent implements Node {
|
||||
id: ID!
|
||||
name: String
|
||||
translation(languageCode: LanguageCodeEnum!): VoucherTranslation
|
||||
voucher: Voucher
|
||||
}
|
||||
|
||||
type VoucherTranslate {
|
||||
errors: [Error!]
|
||||
voucher: Voucher
|
||||
|
|
|
@ -49,7 +49,7 @@ export interface SearchCatalog_products_edges_node_category {
|
|||
export interface SearchCatalog_products_edges_node {
|
||||
__typename: "Product";
|
||||
id: string;
|
||||
category: SearchCatalog_products_edges_node_category;
|
||||
category: SearchCatalog_products_edges_node_category | null;
|
||||
name: string;
|
||||
}
|
||||
|
||||
|
|
|
@ -153,7 +153,7 @@ export interface Product {
|
|||
descriptionJson: any;
|
||||
seoTitle: string | null;
|
||||
seoDescription: string | null;
|
||||
category: Product_category;
|
||||
category: Product_category | null;
|
||||
collections: (Product_collections | null)[] | null;
|
||||
basePrice: Product_basePrice | null;
|
||||
margin: Product_margin | null;
|
||||
|
|
|
@ -159,7 +159,7 @@ export interface ProductCreate_productCreate_product {
|
|||
descriptionJson: any;
|
||||
seoTitle: string | null;
|
||||
seoDescription: string | null;
|
||||
category: ProductCreate_productCreate_product_category;
|
||||
category: ProductCreate_productCreate_product_category | null;
|
||||
collections: (ProductCreate_productCreate_product_collections | null)[] | null;
|
||||
basePrice: ProductCreate_productCreate_product_basePrice | null;
|
||||
margin: ProductCreate_productCreate_product_margin | null;
|
||||
|
|
|
@ -168,7 +168,7 @@ export interface ProductDetails_product {
|
|||
descriptionJson: any;
|
||||
seoTitle: string | null;
|
||||
seoDescription: string | null;
|
||||
category: ProductDetails_product_category;
|
||||
category: ProductDetails_product_category | null;
|
||||
collections: (ProductDetails_product_collections | null)[] | null;
|
||||
basePrice: ProductDetails_product_basePrice | null;
|
||||
margin: ProductDetails_product_margin | null;
|
||||
|
|
|
@ -159,7 +159,7 @@ export interface ProductImageCreate_productImageCreate_product {
|
|||
descriptionJson: any;
|
||||
seoTitle: string | null;
|
||||
seoDescription: string | null;
|
||||
category: ProductImageCreate_productImageCreate_product_category;
|
||||
category: ProductImageCreate_productImageCreate_product_category | null;
|
||||
collections: (ProductImageCreate_productImageCreate_product_collections | null)[] | null;
|
||||
basePrice: ProductImageCreate_productImageCreate_product_basePrice | null;
|
||||
margin: ProductImageCreate_productImageCreate_product_margin | null;
|
||||
|
|
|
@ -159,7 +159,7 @@ export interface ProductImageUpdate_productImageUpdate_product {
|
|||
descriptionJson: any;
|
||||
seoTitle: string | null;
|
||||
seoDescription: string | null;
|
||||
category: ProductImageUpdate_productImageUpdate_product_category;
|
||||
category: ProductImageUpdate_productImageUpdate_product_category | null;
|
||||
collections: (ProductImageUpdate_productImageUpdate_product_collections | null)[] | null;
|
||||
basePrice: ProductImageUpdate_productImageUpdate_product_basePrice | null;
|
||||
margin: ProductImageUpdate_productImageUpdate_product_margin | null;
|
||||
|
|
|
@ -159,7 +159,7 @@ export interface ProductUpdate_productUpdate_product {
|
|||
descriptionJson: any;
|
||||
seoTitle: string | null;
|
||||
seoDescription: string | null;
|
||||
category: ProductUpdate_productUpdate_product_category;
|
||||
category: ProductUpdate_productUpdate_product_category | null;
|
||||
collections: (ProductUpdate_productUpdate_product_collections | null)[] | null;
|
||||
basePrice: ProductUpdate_productUpdate_product_basePrice | null;
|
||||
margin: ProductUpdate_productUpdate_product_margin | null;
|
||||
|
|
|
@ -159,7 +159,7 @@ export interface SimpleProductUpdate_productUpdate_product {
|
|||
descriptionJson: any;
|
||||
seoTitle: string | null;
|
||||
seoDescription: string | null;
|
||||
category: SimpleProductUpdate_productUpdate_product_category;
|
||||
category: SimpleProductUpdate_productUpdate_product_category | null;
|
||||
collections: (SimpleProductUpdate_productUpdate_product_collections | null)[] | null;
|
||||
basePrice: SimpleProductUpdate_productUpdate_product_basePrice | null;
|
||||
margin: SimpleProductUpdate_productUpdate_product_margin | null;
|
||||
|
|
|
@ -4,7 +4,7 @@ import { TypedMutation } from "../mutations";
|
|||
import {
|
||||
categoryTranslationFragment,
|
||||
collectionTranslationFragment,
|
||||
pageTranslationFragment,
|
||||
pageTranslatableFragment,
|
||||
productTranslationFragment,
|
||||
saleTranslationFragment,
|
||||
voucherTranslationFragment
|
||||
|
@ -112,7 +112,7 @@ export const TypedUpdateCollectionTranslations = TypedMutation<
|
|||
>(updateCollectionTranslations);
|
||||
|
||||
const updatePageTranslations = gql`
|
||||
${pageTranslationFragment}
|
||||
${pageTranslatableFragment}
|
||||
mutation UpdatePageTranslations(
|
||||
$id: ID!
|
||||
$input: PageTranslationInput!
|
||||
|
@ -124,7 +124,7 @@ const updatePageTranslations = gql`
|
|||
message
|
||||
}
|
||||
page {
|
||||
...PageTranslationFragment
|
||||
...PageTranslatableFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -179,6 +179,27 @@ export const pageTranslationFragment = gql`
|
|||
}
|
||||
}
|
||||
`;
|
||||
export const pageTranslatableFragment = gql`
|
||||
fragment PageTranslatableFragment on PageTranslatableContent {
|
||||
id
|
||||
contentJson
|
||||
seoDescription
|
||||
seoTitle
|
||||
title
|
||||
|
||||
translation(languageCode: $language) {
|
||||
id
|
||||
contentJson
|
||||
seoDescription
|
||||
seoTitle
|
||||
title
|
||||
language {
|
||||
code
|
||||
language
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const productTypeTranslationFragment = gql`
|
||||
fragment AttributeTranslationFragment on Attribute {
|
||||
id
|
||||
|
|
35
src/translations/types/PageTranslatableFragment.ts
Normal file
35
src/translations/types/PageTranslatableFragment.ts
Normal file
|
@ -0,0 +1,35 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
import { LanguageCodeEnum } from "./../../types/globalTypes";
|
||||
|
||||
// ====================================================
|
||||
// GraphQL fragment: PageTranslatableFragment
|
||||
// ====================================================
|
||||
|
||||
export interface PageTranslatableFragment_translation_language {
|
||||
__typename: "LanguageDisplay";
|
||||
code: LanguageCodeEnum;
|
||||
language: string;
|
||||
}
|
||||
|
||||
export interface PageTranslatableFragment_translation {
|
||||
__typename: "PageTranslation";
|
||||
id: string;
|
||||
contentJson: any;
|
||||
seoDescription: string | null;
|
||||
seoTitle: string | null;
|
||||
title: string;
|
||||
language: PageTranslatableFragment_translation_language;
|
||||
}
|
||||
|
||||
export interface PageTranslatableFragment {
|
||||
__typename: "PageTranslatableContent";
|
||||
id: string;
|
||||
contentJson: any;
|
||||
seoDescription: string | null;
|
||||
seoTitle: string | null;
|
||||
title: string;
|
||||
translation: PageTranslatableFragment_translation | null;
|
||||
}
|
|
@ -31,7 +31,7 @@ export interface UpdatePageTranslations_pageTranslate_page_translation {
|
|||
}
|
||||
|
||||
export interface UpdatePageTranslations_pageTranslate_page {
|
||||
__typename: "Page";
|
||||
__typename: "PageTranslatableContent";
|
||||
id: string;
|
||||
contentJson: any;
|
||||
seoDescription: string | null;
|
||||
|
|
|
@ -698,7 +698,7 @@ export interface CollectionInput {
|
|||
|
||||
export interface ConfigurationItemInput {
|
||||
name: string;
|
||||
value: string;
|
||||
value?: string | null;
|
||||
}
|
||||
|
||||
export interface CustomerFilterInput {
|
||||
|
@ -737,6 +737,7 @@ export interface DraftOrderInput {
|
|||
shippingAddress?: AddressInput | null;
|
||||
shippingMethod?: string | null;
|
||||
voucher?: string | null;
|
||||
customerNote?: string | null;
|
||||
}
|
||||
|
||||
export interface FulfillmentCancelInput {
|
||||
|
@ -870,6 +871,7 @@ export interface ProductFilterInput {
|
|||
isPublished?: boolean | null;
|
||||
collections?: (string | null)[] | null;
|
||||
categories?: (string | null)[] | null;
|
||||
hasCategory?: boolean | null;
|
||||
price?: PriceRangeInput | null;
|
||||
attributes?: (AttributeInput | null)[] | null;
|
||||
stockAvailability?: StockAvailability | null;
|
||||
|
|
Loading…
Reference in a new issue