magento / graphql-ce

[ARCHIVED] Please use magento/magento2 project
https://github.com/magento/magento2
Open Software License 3.0
131 stars 156 forks source link

MyAccount :: Order Details :: Order Details by Order Number #1014

Closed lenaorobei closed 4 years ago

lenaorobei commented 4 years ago

Description (*)

As a Magento end Customer,

I want to see order details in my account.

so that

I can know the right status and details about my order.

Acceptance Criteria:

Additional information

type Customer @doc(description: "Query to return a list of all customer orders"){
    orders (
        filter: CustomerOrdersFilterInput
        currentPage: Int = 1 @doc(description: "current page of the customer order list. default is 1")
        pageSize: Int = 20 @doc(description: "page size for the customer orders list. default is 20")
    ): CustomerOrders
}

input CustomerOrdersFilterInput @doc(description: "Allows to extend the list of search criteria for customer orders"){
    order_number: String!
}

type CustomerOrders @doc(description: "Collection of customer orders"){
    items: [CustomerOrder]! @doc(description: "collection of customer orders that contains individual order details.")
    page_info: SearchResultPageInfo
    total_count: Int @doc(description: "the total count of customer orders")
}

type CustomerOrder @doc(description: "Customer order details"){
    id: ID! @doc(description: "order unique identifier") # `base64encode` representation of `increment_id`.
    order_date: String! @doc(description: "date when the order was placed")
    status: String! @doc(description: "current status of the order")
    number: String! @doc(description: "order number")
    items: [OrderItem]! @doc(description: "collection of all the items purchased")
    prices: SalesPricesInterface! @doc(description: "prices details for the order")
    invoices: [Invoice]! @doc(description: "invoice list for the order")
    credit_memos: [CreditMemo]! @doc(description: "credit memo list for the order")
    shipments: [OrderShipment]! @doc(description: "shipment list for the order")
    payment_methods: [PaymentMethod]! @doc(description: "payment details for the order")
}

type PaymentMethod @doc(description: "Payment method used to pay for the order"){
    name: String! @doc(description: "payment method name for e.g Braintree, Authorize etc.")
    type: String! @doc(description: "payment method type used to pay for the order for e.g Credit Card, PayPal etc.")
    additional_data: [KeyValue] @doc(description: "additional data per payment method type")
}

Implementation should be based on approved proposal: https://github.com/magento/architecture/pull/312

lenaorobei commented 4 years ago

Closed in order to not to increase tech debt and keep feature parity with storefront approach.