saleor-dashboard/src/siteSettings/mutations.ts
Marcin Gębala 71b4b329d8
Drop authorization keys section (#913)
* Drop authorization keys section

* Update translations

* Update snapshots

Co-authored-by: dominik-zeglen <flesz3@o2.pl>
2020-12-21 13:50:04 +01:00

55 lines
1.3 KiB
TypeScript

import { fragmentAddress } from "@saleor/fragments/address";
import { shopErrorFragment } from "@saleor/fragments/errors";
import { shopFragment } from "@saleor/fragments/shop";
import gql from "graphql-tag";
import { TypedMutation } from "../mutations";
import {
ShopSettingsUpdate,
ShopSettingsUpdateVariables
} from "./types/ShopSettingsUpdate";
const shopSettingsUpdate = gql`
${shopErrorFragment}
${shopFragment}
${fragmentAddress}
mutation ShopSettingsUpdate(
$shopDomainInput: SiteDomainInput!
$shopSettingsInput: ShopSettingsInput!
$addressInput: AddressInput
) {
shopSettingsUpdate(input: $shopSettingsInput) {
errors: shopErrors {
...ShopErrorFragment
}
shop {
...ShopFragment
}
}
shopDomainUpdate(input: $shopDomainInput) {
errors: shopErrors {
...ShopErrorFragment
}
shop {
domain {
host
url
}
}
}
shopAddressUpdate(input: $addressInput) {
errors: shopErrors {
...ShopErrorFragment
}
shop {
companyAddress {
...AddressFragment
}
}
}
}
`;
export const TypedShopSettingsUpdate = TypedMutation<
ShopSettingsUpdate,
ShopSettingsUpdateVariables
>(shopSettingsUpdate);