Skip to content

[fix] GraphQl relevant missmatch while perform searching on graphql - #66

Merged
tuyennn merged 1 commit into
masterfrom
feature/graphql-fix
Jul 28, 2026
Merged

[fix] GraphQl relevant missmatch while perform searching on graphql#66
tuyennn merged 1 commit into
masterfrom
feature/graphql-fix

Conversation

@tuyennn

@tuyennn tuyennn commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Bug Fixes
    • Corrected default sorting so it consistently takes priority over other sort orders in search results.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a9249eb1-9f73-4d74-aca0-c30ed8075bb9

📥 Commits

Reviewing files that changed from the base of the PR and between 230b7e4 and e81eefc.

📒 Files selected for processing (1)
  • Plugin/DataProvider/Product/SearchCriteriaBuilder/AddDefaultOrders.php

📝 Walkthrough

Walkthrough

The product search criteria plugin now prepends its default sort order instead of inserting it near the end of existing sort orders, changing sort priority while preserving the updated search criteria return flow.

Changes

Default sort order priority

Layer / File(s) Summary
Prepend the default order
Plugin/DataProvider/Product/SearchCriteriaBuilder/AddDefaultOrders.php
afterBuild uses array_unshift so the default sort order has priority over existing sort orders.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is related to the GraphQL search behavior changed here, though the wording is awkward and misspelled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/graphql-fix

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 PHPStan (2.2.5)

Composer install failed: dependency resolution error. Check composer.json and composer.lock for version constraints.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@what-the-diff

what-the-diff Bot commented Jul 28, 2026

Copy link
Copy Markdown

PR Summary

  • Updated Method for Adding Sorting Order
    The way we rank items in the list has been revamped. Previously, new sorting orders were added to the end of our order list, due to use of the array_splice function. However, the approach has been changed to add them in the beginning using array_unshift. This potentially can help us see the new changes promptly as they are now appearing upfront rather than at the end.

@tuyennn
tuyennn merged commit 6d322e3 into master Jul 28, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant