saleor-apps-redis_apl/apps/taxes/graphql/subscriptions/OrderCreated.graphql
Adrian Pilarczyk 9eacc88b53
feat: align avatax with plugin (#414)
* refactor: 🚚 OrderLineFragmentFragment -> OrderLineFragment

* refactor: 🚚 getLine... to getTaxBaseLine...

* refactor: ♻️ temporarily remove usage of getTaxBaseLineTaxCode

* feat:  add shipping as line to avatax-order-created

* feat:  add description to order-created lines

* feat:  add itemCode to avatax-order-created line

* feat:  add tests for avatax maps

* feat:  add basic discounts logic

* docs: 🔥 remove comment

* build: 👷 add changeset

* fix: 🐛 shipping amount
2023-04-26 13:40:51 +02:00

80 lines
941 B
GraphQL

fragment OrderLine on OrderLine {
productSku
productName
quantity
unitPrice {
net {
amount
}
}
totalPrice {
tax {
amount
}
}
}
fragment OrderCreatedSubscription on Order {
id
user {
id
email
}
created
status
channel {
id
slug
}
shippingAddress {
...Address
}
billingAddress {
...Address
}
total {
currency
net {
amount
}
tax {
amount
}
}
shippingPrice {
gross {
amount
}
net {
amount
}
}
lines {
...OrderLine
}
discounts {
id
amount {
amount
}
}
}
fragment OrderCreatedEventSubscription on Event {
__typename
... on OrderCreated {
order {
...OrderCreatedSubscription
}
}
recipient {
privateMetadata {
key
value
}
}
}
subscription OrderCreatedSubscription {
event {
...OrderCreatedEventSubscription
}
}