pick explicitly fields for mutation (#2353)

This commit is contained in:
Patryk Andrzejewski 2022-10-05 12:35:37 +02:00 committed by GitHub
parent 1002a11f41
commit 636d6ce416
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,12 +63,16 @@ export const ChannelCreateView = ({}) => {
warehousesToDisplay, warehousesToDisplay,
currencyCode, currencyCode,
allocationStrategy, allocationStrategy,
...rest name,
slug,
defaultCountry,
}: FormData) => { }: FormData) => {
const createChannelMutation = createChannel({ const createChannelMutation = createChannel({
variables: { variables: {
input: { input: {
...rest, defaultCountry,
name,
slug,
currencyCode: currencyCode.toUpperCase(), currencyCode: currencyCode.toUpperCase(),
addShippingZones: shippingZonesIdsToAdd, addShippingZones: shippingZonesIdsToAdd,
addWarehouses: warehousesIdsToAdd, addWarehouses: warehousesIdsToAdd,