Update GraphQL schema and its types (#853)

This commit is contained in:
Dawid Tarasiuk 2020-11-23 12:38:28 +01:00 committed by GitHub
parent acdec39489
commit 48a68ed1bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 34 additions and 167 deletions

View file

@ -1245,7 +1245,6 @@ type CollectionTranslation implements Node {
type CollectionUpdate {
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
collectionErrors: [CollectionError!]!
productErrors: [ProductError!]!
collection: Collection
}
@ -1799,6 +1798,7 @@ input DraftOrderCreateInput {
voucher: ID
customerNote: String
channel: ID
redirectUrl: String
lines: [OrderLineCreateInput]
}
@ -1818,6 +1818,7 @@ input DraftOrderInput {
voucher: ID
customerNote: String
channel: ID
redirectUrl: String
}
type DraftOrderLineDelete {
@ -2585,7 +2586,6 @@ type Mutation {
productUpdate(id: ID!, input: ProductInput!): ProductUpdate
productTranslate(id: ID!, input: TranslationInput!, languageCode: LanguageCodeEnum!): ProductTranslate
productChannelListingUpdate(id: ID!, input: ProductChannelListingUpdateInput!): ProductChannelListingUpdate
productSetAvailabilityForPurchase(isAvailable: Boolean!, productId: ID!, startDate: Date): ProductSetAvailabilityForPurchase
productImageCreate(input: ProductImageCreateInput!): ProductImageCreate
productVariantReorder(moves: [ReorderInput]!, productId: ID!): ProductVariantReorder
productImageDelete(id: ID!): ProductImageDelete
@ -2596,11 +2596,7 @@ type Mutation {
productTypeDelete(id: ID!): ProductTypeDelete
productTypeBulkDelete(ids: [ID]!): ProductTypeBulkDelete
productTypeUpdate(id: ID!, input: ProductTypeInput!): ProductTypeUpdate
productTypeReorderAttributes(moves: [ReorderInput]!, productTypeId: ID!, type: AttributeTypeEnum!): ProductTypeReorderAttributes
productTypeUpdateMetadata(id: ID!, input: MetaInput!): ProductTypeUpdateMeta @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.")
productTypeClearMetadata(id: ID!, input: MetaPath!): ProductTypeClearMeta @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.")
productTypeUpdatePrivateMetadata(id: ID!, input: MetaInput!): ProductTypeUpdatePrivateMeta @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.")
productTypeClearPrivateMetadata(id: ID!, input: MetaPath!): ProductTypeClearPrivateMeta @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.")
productTypeReorderAttributes(moves: [ReorderInput]!, productTypeId: ID!, type: ProductAttributeType!): ProductTypeReorderAttributes
digitalContentCreate(input: DigitalContentUploadInput!, variantId: ID!): DigitalContentCreate
digitalContentDelete(variantId: ID!): DigitalContentDelete
digitalContentUpdate(input: DigitalContentInput!, variantId: ID!): DigitalContentUpdate
@ -2775,11 +2771,6 @@ type Mutation {
userAvatarUpdate(image: Upload!): UserAvatarUpdate
userAvatarDelete: UserAvatarDelete
userBulkSetActive(ids: [ID]!, isActive: Boolean!): UserBulkSetActive
serviceAccountCreate(input: ServiceAccountInput!): ServiceAccountCreate @deprecated(reason: "Use the `appCreate` mutation instead. This field will be removed after 2020-07-31.")
serviceAccountUpdate(id: ID!, input: ServiceAccountInput!): ServiceAccountUpdate @deprecated(reason: "Use the `appUpdate` mutation instead. This field will be removed after 2020-07-31.")
serviceAccountDelete(id: ID!): ServiceAccountDelete @deprecated(reason: "Use the `appDelete` mutation instead. This field will be removed after 2020-07-31.")
serviceAccountTokenCreate(input: ServiceAccountTokenInput!): ServiceAccountTokenCreate @deprecated(reason: "Use the `appTokenCreate` mutation instead. This field will be removed after 2020-07-31.")
serviceAccountTokenDelete(id: ID!): ServiceAccountTokenDelete @deprecated(reason: "Use the `appTokenDelete` mutation instead. This field will be removed after 2020-07-31.")
permissionGroupCreate(input: PermissionGroupCreateInput!): PermissionGroupCreate
permissionGroupUpdate(id: ID!, input: PermissionGroupUpdateInput!): PermissionGroupUpdate
permissionGroupDelete(id: ID!): PermissionGroupDelete
@ -2830,6 +2821,7 @@ type Order implements Node & ObjectWithMetadata {
displayGrossPrices: Boolean!
customerNote: String!
weight: Weight
redirectUrl: String
privateMetadata: [MetadataItem]!
metadata: [MetadataItem]!
fulfillments: [Fulfillment]!
@ -3754,6 +3746,7 @@ type ProductChannelListing implements Node {
purchaseCost: MoneyRange
margin: Margin
isAvailableForPurchase: Boolean
pricing: ProductPricingInfo
}
input ProductChannelListingAddInput {
@ -4339,7 +4332,7 @@ type Query {
exportFile(id: ID!): ExportFile
exportFiles(filter: ExportFileFilterInput, sortBy: ExportFileSortingInput, before: String, after: String, first: Int, last: Int): ExportFileCountableConnection
taxTypes: [TaxType]
checkout(token: UUID, channel: String): Checkout
checkout(token: UUID): Checkout
checkouts(channel: String, before: String, after: String, first: Int, last: Int): CheckoutCountableConnection
checkoutLine(id: ID): CheckoutLine
checkoutLines(before: String, after: String, first: Int, last: Int): CheckoutLineCountableConnection
@ -4546,92 +4539,6 @@ input SeoInput {
description: String
}
type ServiceAccount implements Node & ObjectWithMetadata {
id: ID!
name: String
created: DateTime
isActive: Boolean
permissions: [Permission]
tokens: [ServiceAccountToken]
privateMetadata: [MetadataItem]!
metadata: [MetadataItem]!
}
type ServiceAccountCountableConnection {
pageInfo: PageInfo!
edges: [ServiceAccountCountableEdge!]!
totalCount: Int
}
type ServiceAccountCountableEdge {
node: ServiceAccount!
cursor: String!
}
type ServiceAccountCreate {
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
authToken: String
accountErrors: [AccountError!]!
serviceAccount: ServiceAccount
}
type ServiceAccountDelete {
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
accountErrors: [AccountError!]!
serviceAccount: ServiceAccount
}
input ServiceAccountFilterInput {
search: String
isActive: Boolean
}
input ServiceAccountInput {
name: String
isActive: Boolean
permissions: [PermissionEnum]
}
enum ServiceAccountSortField {
NAME
CREATION_DATE
}
input ServiceAccountSortingInput {
direction: OrderDirection!
field: ServiceAccountSortField!
}
type ServiceAccountToken implements Node {
name: String
authToken: String
id: ID!
}
type ServiceAccountTokenCreate {
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
authToken: String
accountErrors: [AccountError!]!
serviceAccountToken: ServiceAccountToken
}
type ServiceAccountTokenDelete {
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
accountErrors: [AccountError!]!
serviceAccountToken: ServiceAccountToken
}
input ServiceAccountTokenInput {
name: String
serviceAccount: ID!
}
type ServiceAccountUpdate {
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
accountErrors: [AccountError!]!
serviceAccount: ServiceAccount
}
type SetPassword {
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
token: String
@ -5255,7 +5162,8 @@ type User implements Node & ObjectWithMetadata {
privateMetadata: [MetadataItem]!
metadata: [MetadataItem]!
addresses: [Address]
checkout: Checkout
checkout: Checkout @deprecated(reason: "Use the `checkout_tokens` field to fetch the user checkouts.")
checkoutTokens(channel: String): [UUID!]
giftCards(before: String, after: String, first: Int, last: Int): GiftCardCountableConnection
orders(before: String, after: String, first: Int, last: Int): OrderCountableConnection
permissions: [Permission] @deprecated(reason: "Will be removed in Saleor 2.11.Use the `userPermissions` instead.")
@ -5756,8 +5664,8 @@ enum WeightUnitsEnum {
scalar _Any
union _Entity = Address | User | Group | ServiceAccount | App | ProductVariant | Product | ProductType | Collection | Category | ProductImage | PageType
union _Entity = Address | User | Group | App | ProductVariant | Product | ProductType | Collection | Category | ProductImage | PageType
type _Service {
sdl: String
}
}

View file

@ -8,10 +8,10 @@
export interface Channel_channel {
__typename: "Channel";
name: string;
slug: string;
id: string;
isActive: boolean;
name: string;
slug: string;
currencyCode: string;
}

View file

@ -10,10 +10,10 @@ import { ChannelErrorCode } from "./../../types/globalTypes";
export interface ChannelActivate_channelActivate_channel {
__typename: "Channel";
name: string;
slug: string;
id: string;
isActive: boolean;
name: string;
slug: string;
currencyCode: string;
}

View file

@ -10,10 +10,10 @@ import { ChannelCreateInput, ChannelErrorCode } from "./../../types/globalTypes"
export interface ChannelCreate_channelCreate_channel {
__typename: "Channel";
name: string;
slug: string;
id: string;
isActive: boolean;
name: string;
slug: string;
currencyCode: string;
}

View file

@ -10,10 +10,10 @@ import { ChannelErrorCode } from "./../../types/globalTypes";
export interface ChannelDeactivate_channelDeactivate_channel {
__typename: "Channel";
name: string;
slug: string;
id: string;
isActive: boolean;
name: string;
slug: string;
currencyCode: string;
}

View file

@ -10,10 +10,10 @@ import { ChannelDeleteInput, ChannelErrorCode } from "./../../types/globalTypes"
export interface ChannelDelete_channelDelete_channel {
__typename: "Channel";
name: string;
slug: string;
id: string;
isActive: boolean;
name: string;
slug: string;
currencyCode: string;
}

View file

@ -10,10 +10,10 @@ import { ChannelUpdateInput, ChannelErrorCode } from "./../../types/globalTypes"
export interface ChannelUpdate_channelUpdate_channel {
__typename: "Channel";
name: string;
slug: string;
id: string;
isActive: boolean;
name: string;
slug: string;
currencyCode: string;
}

View file

@ -8,10 +8,10 @@
export interface Channels_channels {
__typename: "Channel";
name: string;
slug: string;
id: string;
isActive: boolean;
name: string;
slug: string;
currencyCode: string;
}

View file

@ -19,7 +19,7 @@ export interface MetadataFragment_privateMetadata {
}
export interface MetadataFragment {
__typename: "ServiceAccount" | "App" | "ShippingZone" | "ShippingMethod" | "Product" | "ProductType" | "Attribute" | "Category" | "ProductVariant" | "DigitalContent" | "Collection" | "Page" | "PageType" | "User" | "Checkout" | "Order" | "Fulfillment" | "Invoice";
__typename: "App" | "ShippingZone" | "ShippingMethod" | "Product" | "ProductType" | "Attribute" | "Category" | "ProductVariant" | "DigitalContent" | "Collection" | "Page" | "PageType" | "User" | "Checkout" | "Order" | "Fulfillment" | "Invoice";
metadata: (MetadataFragment_metadata | null)[];
privateMetadata: (MetadataFragment_privateMetadata | null)[];
}

View file

@ -1,39 +0,0 @@
/* tslint:disable */
/* eslint-disable */
// This file was automatically generated and should not be edited.
import { ProductErrorCode } from "./../../types/globalTypes";
// ====================================================
// GraphQL mutation operation: ProductSetAvailabilityForPurchase
// ====================================================
export interface ProductSetAvailabilityForPurchase_productSetAvailabilityForPurchase_product {
__typename: "Product";
id: string;
availableForPurchase: any | null;
isAvailableForPurchase: boolean | null;
}
export interface ProductSetAvailabilityForPurchase_productSetAvailabilityForPurchase_errors {
__typename: "ProductError";
code: ProductErrorCode;
field: string | null;
message: string | null;
}
export interface ProductSetAvailabilityForPurchase_productSetAvailabilityForPurchase {
__typename: "ProductSetAvailabilityForPurchase";
product: ProductSetAvailabilityForPurchase_productSetAvailabilityForPurchase_product | null;
errors: ProductSetAvailabilityForPurchase_productSetAvailabilityForPurchase_errors[];
}
export interface ProductSetAvailabilityForPurchase {
productSetAvailabilityForPurchase: ProductSetAvailabilityForPurchase_productSetAvailabilityForPurchase | null;
}
export interface ProductSetAvailabilityForPurchaseVariables {
isAvailable: boolean;
productId: string;
startDate?: any | null;
}

View file

@ -1210,6 +1210,7 @@ export interface DraftOrderCreateInput {
voucher?: string | null;
customerNote?: string | null;
channel?: string | null;
redirectUrl?: string | null;
lines?: (OrderLineCreateInput | null)[] | null;
}
@ -1223,6 +1224,7 @@ export interface DraftOrderInput {
voucher?: string | null;
customerNote?: string | null;
channel?: string | null;
redirectUrl?: string | null;
}
export interface ExportInfoInput {
@ -1367,10 +1369,6 @@ export interface PageCreateInput {
pageType: string;
}
export interface PageFilterInput {
search?: string | null;
}
export interface PageInput {
slug?: string | null;
title?: string | null;
@ -1460,6 +1458,11 @@ export interface PriceRangeInput {
lte?: number | null;
}
export interface ProductAttributeAssignInput {
id: string;
type: ProductAttributeType;
}
export interface ProductChannelListingAddInput {
channelId: string;
isPublished?: boolean | null;
@ -1474,11 +1477,6 @@ export interface ProductChannelListingUpdateInput {
removeChannels?: string[] | null;
}
export interface ProductAttributeAssignInput {
id: string;
type: ProductAttributeType;
}
export interface ProductCreateInput {
attributes?: (AttributeValueInput | null)[] | null;
category?: string | null;

View file

@ -38,7 +38,7 @@ export interface UpdateMetadata_deleteMetadata_item_privateMetadata {
}
export interface UpdateMetadata_deleteMetadata_item {
__typename: "ServiceAccount" | "App" | "ShippingZone" | "ShippingMethod" | "Product" | "ProductType" | "Attribute" | "Category" | "ProductVariant" | "DigitalContent" | "Collection" | "Page" | "PageType" | "User" | "Checkout" | "Order" | "Fulfillment" | "Invoice";
__typename: "App" | "ShippingZone" | "ShippingMethod" | "Product" | "ProductType" | "Attribute" | "Category" | "ProductVariant" | "DigitalContent" | "Collection" | "Page" | "PageType" | "User" | "Checkout" | "Order" | "Fulfillment" | "Invoice";
metadata: (UpdateMetadata_deleteMetadata_item_metadata | null)[];
privateMetadata: (UpdateMetadata_deleteMetadata_item_privateMetadata | null)[];
id: string;

View file

@ -38,7 +38,7 @@ export interface UpdatePrivateMetadata_deletePrivateMetadata_item_privateMetadat
}
export interface UpdatePrivateMetadata_deletePrivateMetadata_item {
__typename: "ServiceAccount" | "App" | "ShippingZone" | "ShippingMethod" | "Product" | "ProductType" | "Attribute" | "Category" | "ProductVariant" | "DigitalContent" | "Collection" | "Page" | "PageType" | "User" | "Checkout" | "Order" | "Fulfillment" | "Invoice";
__typename: "App" | "ShippingZone" | "ShippingMethod" | "Product" | "ProductType" | "Attribute" | "Category" | "ProductVariant" | "DigitalContent" | "Collection" | "Page" | "PageType" | "User" | "Checkout" | "Order" | "Fulfillment" | "Invoice";
metadata: (UpdatePrivateMetadata_deletePrivateMetadata_item_metadata | null)[];
privateMetadata: (UpdatePrivateMetadata_deletePrivateMetadata_item_privateMetadata | null)[];
id: string;