saleor-apps-redis_apl/apps/taxes/graphql/fragments/TaxBase.graphql
Adrian Pilarczyk 9f0dd813a4
feat: add taxes app (#223)
* feat:  add taxes app

* chore: 🔥 remove files, use monorepo ones instead

* chore:  add all env vars to .env.example

* refactor: 🔧 use saleor eslint config

* build: ⬆️ app-sdk, remove vercel from apl

* refactor: ♻️ remove providers/index, infer taxProviders from providerConfig

* refactor: ♻️ use tuples to use objects

* refactor: 🚚 move types to taxes module

* refactor: ♻️ tax-prepare-data -> tax-line-resolver

* refactor: get isInFrame from apps-shared

* build: ⬆️ next

* feat:  add appRegister allowlist

* Update apps/taxes/src/pages/api/manifest.ts

Co-authored-by: Krzysztof Wolski <krzysztof.k.wolski@gmail.com>

* Update apps/taxes/src/pages/api/manifest.ts

Co-authored-by: Krzysztof Wolski <krzysztof.k.wolski@gmail.com>

* chore: 💡 improve comments

* refactor: 🔥 app-dashboard-link

* docs: 📝 add taxes to readme

* refactor: 🔥 app-main-bar

* refactor: ♻️ align saleor-app.ts with the rest

* refactor: ♻️ use defaultValues

* chore: ♻️ misc

---------

Co-authored-by: Krzysztof Wolski <krzysztof.k.wolski@gmail.com>
2023-03-02 12:01:17 +01:00

69 lines
1,023 B
GraphQL

fragment TaxBaseLine on TaxableObjectLine {
chargeTaxes
sourceLine {
__typename
... on CheckoutLine {
id
productVariant: variant {
id
product {
metafield(key: "taxjar_tax_code")
productType {
metafield(key: "taxjar_tax_code")
}
}
}
}
... on OrderLine {
id
variant {
id
product {
metafield(key: "taxjar_tax_code")
productType {
metafield(key: "taxjar_tax_code")
}
}
}
}
}
quantity
unitPrice {
amount
}
totalPrice {
amount
}
}
fragment TaxDiscount on TaxableObjectDiscount {
name
amount {
amount
}
}
fragment TaxBase on TaxableObject {
currency
channel {
slug
}
discounts {
...TaxDiscount
}
address {
streetAddress1
streetAddress2
city
country {
code
}
countryArea
postalCode
}
shippingPrice {
amount
}
lines {
...TaxBaseLine
}
}