Skip to content

Saleor Core: the high performance, composable, headless commerce API.

New GraphQL schema and types

fowczarekb2d775767b96
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphql
index 6c5fc8064e..487a9508e8 100644
--- a/saleor/graphql/schema.graphql
+++ b/saleor/graphql/schema.graphql
@@ -226,7 +226,7 @@ type Category implements Node {
slug: String!
description: String!
parent: Category
- backgroundImage: Image
+ backgroundImage(size: Int): Image
level: Int!
children(before: String, after: String, first: Int, last: Int): CategoryCountableConnection
products(before: String, after: String, first: Int, last: Int): ProductCountableConnection
@@ -261,6 +261,7 @@ input CategoryInput {
slug: String
seo: SeoInput
backgroundImage: Upload
+ backgroundImageAlt: String
}
type CategoryUpdate {
@@ -405,7 +406,7 @@ type Collection implements Node {
name: String!
slug: String!
products(before: String, after: String, first: Int, last: Int): ProductCountableConnection
- backgroundImage: Image
+ backgroundImage(size: Int): Image
isPublished: Boolean!
description: String!
}
@@ -437,6 +438,7 @@ input CollectionCreateInput {
slug: String
description: String
backgroundImage: Upload
+ backgroundImageAlt: String
seo: SeoInput
products: [ID]
}
@@ -452,6 +454,7 @@ input CollectionInput {
slug: String
description: String
backgroundImage: Upload
+ backgroundImageAlt: String
seo: SeoInput
}
@@ -686,7 +689,8 @@ type HomepageCollectionUpdate {
}
type Image {
- url(size: Int): String!
+ url: String!
+ alt: String
}
scalar JSONString
@@ -1322,7 +1326,8 @@ type Product implements Node {
images: [ProductImage]
collections: [Collection]
url: String!
- thumbnailUrl(size: Int): String
+ thumbnailUrl(size: Int): String @deprecated(reason: "thumbnailUrl is deprecated, use\\n thumbnail instead")
+ thumbnail(size: Int): Image
availability: ProductAvailability
purchaseCost: MoneyRange
margin: Margin
diff --git a/saleor/static/dashboard-next/types/globalTypes.ts b/saleor/static/dashboard-next/types/globalTypes.ts
index ef31a80c48..74f14889bf 100644
--- a/saleor/static/dashboard-next/types/globalTypes.ts
+++ b/saleor/static/dashboard-next/types/globalTypes.ts
@@ -171,6 +171,7 @@ export interface CategoryInput {
slug?: string | null;
seo?: SeoInput | null;
backgroundImage?: any | null;
+ backgroundImageAlt?: string | null;
}
export interface CollectionCreateInput {
@@ -179,6 +180,7 @@ export interface CollectionCreateInput {
slug?: string | null;
description?: string | null;
backgroundImage?: any | null;
+ backgroundImageAlt?: string | null;
seo?: SeoInput | null;
products?: (string | null)[] | null;
}
@@ -189,6 +191,7 @@ export interface CollectionInput {
slug?: string | null;
description?: string | null;
backgroundImage?: any | null;
+ backgroundImageAlt?: string | null;
seo?: SeoInput | null;
}