saleor-dashboard/src/siteSettings/queries.ts

38 lines
678 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-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
);