You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to move OrderSettings from Query and place them inside a Channel type. Same way as we have stockSettings inside Channel. The proposed approach will allow us to configure order settings per channel.
Describe a proposed solution
Channel
Channel type will have a new field:
"""Represents channel."""typeChannelimplementsNode {
id: ID!
...
""" Define the stock setting for this channel. Added in Saleor 3.7. Note: this API is currently in Feature Preview and can be subject to changes at later point. Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER. """stockSettings: StockSettings!"""MANAGE_ORDERS or MANAGE_CHANNELS"""orderSettings: OrderSettings!
}
Permission MANAGE_ORDERS or MANAGE_CHANNELS will be required to fetch orderSettings.
The channelCreate and channelUpdate mutations will get new input fields:
inputOrderSettingsInput {
""" When disabled, all new orders from checkout will be marked as unconfirmed. When enabled orders from checkout will become unfulfilled immediately. """automaticallyConfirmAllNewOrders: Boolean""" When enabled, all non-shippable gift card orders will be fulfilled automatically. """automaticallyFulfillNonShippableGiftCard: Boolean
}
inputChannelUpdateInput {
""" The channel stock settings. Added in Saleor 3.7. Note: this API is currently in Feature Preview and can be subject to changes at later point. """stockSettings: StockSettingsInput
...
orderSettings: OrderSettingsInput
Permission MANAGE_ORDERS or MANAGE_CHANNELS will be required to update orderSettings. MANAGE_ORDERS can be used only when channelUpdate mutation will get OrderSettingsInput and not any other fields will be updated. Otherwise needed permission will be MANAGE_CHANNELS
inputChannelCreateInput {
""" The channel stock settings. Added in Saleor 3.7. Note: this API is currently in Feature Preview and can be subject to changes at later point. """stockSettings: StockSettingsInput
...
orderSettings: OrderSettingsInput
""" Update shop order settings. Requires one of the following permissions: MANAGE_ORDERS. """orderSettingsUpdate(
"""Fields required to update shop order settings."""input: OrderSettingsUpdateInput!
): OrderSettingsUpdate
The description will suggest using channelUpdate mutation to update orderSettings.
In case of calling deprecated OrderSettingsUpdate mutation, records for all channels will be updated.
The query orderSettings will be deprecated:
orderSettings: OrderSettings
The query will return results for first channel in alphabetical order.
In the case of using the deprecated mutation orderSettingsUpdate and deprecated query orderSettings the returned data will always be correct.
Other solutions I've tried and won't work
I was also thinking about extending a Shop type, but Channel sounds better, as we already have there a stockSettings.
The text was updated successfully, but these errors were encountered:
What I'm trying to achieve
I would like to move
OrderSettings
fromQuery
and place them inside aChannel
type. Same way as we havestockSettings
insideChannel
. The proposed approach will allow us to configure order settings per channel.Describe a proposed solution
Channel
Channel type will have a new field:
Permission
MANAGE_ORDERS
orMANAGE_CHANNELS
will be required to fetchorderSettings
.The
channelCreate
andchannelUpdate
mutations will get new input fields:Permission
MANAGE_ORDERS
orMANAGE_CHANNELS
will be required to updateorderSettings
.MANAGE_ORDERS
can be used only whenchannelUpdate
mutation will getOrderSettingsInput
and not any other fields will be updated. Otherwise needed permission will beMANAGE_CHANNELS
OrderSettings
The
OrderSettings
type already exists:Mutation
orderSettingsUpdate
will be deprecated:The description will suggest using
channelUpdate
mutation to updateorderSettings
.In case of calling deprecated
OrderSettingsUpdate
mutation, records for all channels will be updated.The query
orderSettings
will be deprecated:The query will return results for first channel in alphabetical order.
In the case of using the deprecated mutation
orderSettingsUpdate
and deprecated queryorderSettings
the returned data will always be correct.Other solutions I've tried and won't work
I was also thinking about extending a Shop type, but Channel sounds better, as we already have there a
stockSettings
.The text was updated successfully, but these errors were encountered: