-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(order): add typename to driver response models (#1229)
__typename must be grabbed in order to properly match fragments `addTypename: true` with the cache forces flushed responses to match the query (which includes __typename) flushed responses that do not have __typename will cause invariant errors adding __typename on the response models makes it easier to stub out response objects in tests
- Loading branch information
1 parent
64a941d
commit 86dfb7f
Showing
38 changed files
with
96 additions
and
37 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
libs/order/driver/magento/2.4.0/src/models/responses/order-address.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
libs/order/driver/magento/2.4.0/src/models/responses/order-item.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
libs/order/driver/magento/2.4.0/src/models/responses/order-payment.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
libs/order/driver/magento/2.4.0/src/models/responses/order-shipment-item.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import { MagentoGraycoreOrderItem } from './order-item'; | ||
|
||
export interface MagentoGraycoreOrderShipmentItem { | ||
__typename?: 'GraycoreOrderShipmentItem'; | ||
item: MagentoGraycoreOrderItem; | ||
qty: number; | ||
}; |
1 change: 1 addition & 0 deletions
1
libs/order/driver/magento/2.4.0/src/models/responses/order-shipment-tracking.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
libs/order/driver/magento/2.4.1/src/models/responses/discount.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import { MagentoMoney } from '@daffodil/driver/magento'; | ||
|
||
export interface MagentoDiscount { | ||
__typename?: 'Discount'; | ||
amount: MagentoMoney; | ||
label: string; | ||
} |
1 change: 1 addition & 0 deletions
1
libs/order/driver/magento/2.4.1/src/models/responses/order-address.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
libs/order/driver/magento/2.4.1/src/models/responses/order-credit-item.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import { MagentoOrderItem } from './order-item' | ||
|
||
export interface MagentoOrderCreditItem { | ||
__typename?: 'CreditMemoItem'; | ||
order_item: MagentoOrderItem; | ||
quantity_refunded: number; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
libs/order/driver/magento/2.4.1/src/models/responses/order-invoice-item.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.