Closed
Description
This issue is automatically created based on existing pull request: #33805: Fixed customerOrders GraphQL queries containing sub-resolvers requiring 'model'
Description (*)
This PR fixes the customerOrders
GraphQL query containing arguments that require $value['model']
to be filled with the order object. Although the query itself is deprecated already and the data can be retrieved by a customer
query (which works well) with appropriate arguments, I think that we should support customerOrders
for as long as it's not removed from the codebase.
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
- Register a customer and place an order in the admin panel for that customer
- Generate an invoice for that order
- Use the following GraphQL mutation to generate the customer token:
mutation {
generateCustomerToken(
email: "your.customer@email.here"
password: "your-password"
) {
token
}
}
- Use the token from from the previous mutation to authorize the following query:
query {
customerOrders {
items {
order_number
grand_total
status
invoices {
id
items {
id
discounts {
amount {
value
}
}
}
}
}
}
}
This will trigger the faulty behavior.
Questions or comments
Contribution checklist (*)
- Pull request has a meaningful description of its purpose
- All commits are accompanied by meaningful commit messages
- All new or changed code is covered with unit/integration tests (if applicable)
- README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
- All automated tests passed successfully (all builds are green)