-
Notifications
You must be signed in to change notification settings - Fork 9.4k
magento/magento2#37803: Customer order filters graphql #38079
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hi @serbynskyi. Thank you for your contribution! Add the comment under your pull request to deploy test or vanilla Magento instance:
❗ Automated tests can be triggered manually with an appropriate comment:
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
@serbynskyi thank you for your Pull request. Can you also cover your changes with the web API function test? |
Hey! take a look at this one: #36949 @serbynskyi |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
@magento run WebAPI Tests, Static Tests, Integration Tests, Functional Tests EE, Functional Tests CE, Functional Tests B2B |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
@magento run Functional Tests CE |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @serbynskyi,
Thanks for the contribution!
The Changes looks good to me and the failed test seems flaky to me. But please cover the changes with some automated test in accordance with DOD.
Thanks
Working on web API test coverage. |
@magento create issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @serbynskyi
Thank you for contribution
Looks good for me
Approved
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
Hello @engcom-Echo I'll close last one |
✔️ QA PassedPreconditions:
Manual testing scenario:
![]() Builds are failing. Hence moving it to |
Hey guys. Which PR we need to choice for merging?
What do you think @engcom-Hotel @engcom-Echo @shikhamis11 about my suggestion? |
or we can combine both PRs |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
Hi @andrewbess, Thank you for the information We will take #36949 PR further as the schema changes are in place. Till then keeping this PR to On Hold until #36949 will get merge. Thank you! |
Description (*)
Fixed Issue
Manual testing scenarios (*)
1.Create a new Module CustomerOrder.
2.Create a schema.graphqls in Teeela/CustomerOrder/etc/ folder to extend the CustomerOrderFilterInput.
Put following codes in this file:
input CustomerOrdersFilterInput @doc(description: "Identifies the filter to use for filtering orders.") {
number: FilterStringTypeInput @doc(description: "Filters by order number.")
created_at: FilterRangeTypeInput @doc(description: "Filters by created at.")
status: FilterEqualTypeInput @doc(description: "Filters by status.")
}
input FilterRangeTypeInput @doc(description: "Defines a filter that matches a range of values, such as prices or dates.") {
from: String @doc(description: "The beginning of the range")
to: String @doc(description: "The end of the range")
}
input FilterEqualTypeInput @doc(description: "Defines a filter that matches the input exactly.") {
in: [String] @doc(description: "An array of values to filter on")
eq: String @doc(description: "A string to filter on")
}
3.Use the following payload and {{your URL}}/graphql to query the customer token.
mutation {
generateCustomerToken(email: "{{your email address}}", password: "{{your password}}") {
token
}
}
4.Put above token in Postman Headers Authorization with Bearer {{your token}}.
5.Use following payload to query the above customer's sales orders.
query {
customer {
orders(filter: { created_at: { from: "2023-07-22" } status:{ in:["Processing"]} })
{
items {
number
created_at
}
}
}