Skip to content

Commit 32b02d5

Browse files
committed
Add Address fragment to OrderForm
1 parent a159d62 commit 32b02d5

File tree

3 files changed

+22
-24
lines changed

3 files changed

+22
-24
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
99

1010
## Added
1111

12+
- `Address` fragment to `OrderForm`.
13+
14+
## Added
15+
1216
- Shipping info to `OrderForm` fragment.
1317
- `EstimateShipping` mutation.
1418

react/fragments/address.graphql

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
fragment Address on Address {
2+
addressId
3+
addressType
4+
city
5+
complement
6+
country
7+
neighborhood
8+
number
9+
postalCode
10+
receiverName
11+
reference
12+
state
13+
street
14+
}

react/fragments/orderForm.graphql

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#import './address.graphql'
2+
13
fragment OrderFormFragment on OrderForm {
24
items {
35
additionalInfo {
@@ -32,32 +34,10 @@ fragment OrderFormFragment on OrderForm {
3234
shipping {
3335
countries
3436
availableAddresses {
35-
addressId
36-
addressType
37-
city
38-
complement
39-
country
40-
neighborhood
41-
number
42-
postalCode
43-
receiverName
44-
reference
45-
state
46-
street
37+
...Address
4738
}
4839
selectedAddress {
49-
addressId
50-
addressType
51-
city
52-
complement
53-
country
54-
neighborhood
55-
number
56-
postalCode
57-
receiverName
58-
reference
59-
state
60-
street
40+
...Address
6141
}
6242
}
6343
messages {

0 commit comments

Comments
 (0)