saleor-dashboard/src/taxes/queries.ts
Krzysztof Wolski a82de30309
Add circleci config and enhance our linters (#519)
* Add circleci config

* Season linting config

* Apply code style
2020-05-14 11:30:32 +02:00

45 lines
933 B
TypeScript

import gql from "graphql-tag";
import { TypedQuery } from "../queries";
import { CountryList } from "./types/CountryList";
export const countryFragment = gql`
fragment CountryFragment on CountryDisplay {
country
code
}
`;
export const countryWithTaxesFragment = gql`
${countryFragment}
fragment CountryWithTaxesFragment on CountryDisplay {
...CountryFragment
vat {
standardRate
reducedRates {
rateType
rate
}
}
}
`;
export const shopTaxesFragment = gql`
fragment ShopTaxesFragment on Shop {
chargeTaxesOnShipping
includeTaxesInPrices
displayGrossPrices
}
`;
const countryList = gql`
${countryWithTaxesFragment}
${shopTaxesFragment}
query CountryList {
shop {
...ShopTaxesFragment
countries {
...CountryWithTaxesFragment
}
}
}
`;
export const TypedCountryListQuery = TypedQuery<CountryList, {}>(countryList);