saleor-dashboard/src/siteSettings/queries.ts

42 lines
761 B
TypeScript
Raw Normal View History

2019-06-19 14:40:52 +00:00
import gql from "graphql-tag";
2019-08-09 11:14:35 +00:00
import { fragmentAddress } from "../orders/queries";
2019-06-19 14:40:52 +00:00
import { TypedQuery } from "../queries";
import { SiteSettings } from "./types/SiteSettings";
export const shopFragment = gql`
2019-08-09 11:14:35 +00:00
${fragmentAddress}
2019-06-19 14:40:52 +00:00
fragment ShopFragment on Shop {
authorizationKeys {
key
name
}
2019-08-09 11:14:35 +00:00
companyAddress {
...AddressFragment
}
countries {
code
country
}
2019-10-21 14:14:28 +00:00
customerSetPasswordUrl
defaultMailSenderAddress
defaultMailSenderName
2019-06-19 14:40:52 +00:00
description
domain {
host
}
name
}
`;
const siteSettings = gql`
${shopFragment}
query SiteSettings {
shop {
...ShopFragment
}
}
`;
export const TypedSiteSettingsQuery = TypedQuery<SiteSettings, {}>(
siteSettings
);